Skip to content

Commit cabf84b

Browse files
committed
docs(no-os): simpler and more complete
- Remind user to connect to WiFi. - Remove the IP section. Just connect to localhost and it will work always. - Remind to add experimental features to CLI. - Add `--build-on remote`, or most likely the live system will run out of disk space (which is actually RAM at that moment). @moduon MT-9339
1 parent 76b6890 commit cabf84b

File tree

1 file changed

+7
-39
lines changed

1 file changed

+7
-39
lines changed

docs/howtos/no-os.md

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -18,53 +18,21 @@ If an installer is detected, `nixos-anywhere` will not attempt to `kexec` into
1818
its own image. This is particularly useful for targets that don't have enough
1919
RAM for `kexec` or don't support `kexec`.
2020

21+
Often you will need some kind of network connectivity before installing NixOS.
22+
Use the live system to connect to some network.
23+
2124
NixOS starts an SSH server on the installer by default, but you need to set a
2225
password in order to access it. To set a password for the `nixos` user, run the
2326
following command in a terminal on the NixOS machine:
2427

25-
```
28+
```shell
2629
passwd
2730
```
2831

29-
If you don't know the IP address of the installer on your network, you can find
30-
it by running the following command:
31-
32-
```
33-
$ ip addr
34-
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
35-
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
36-
inet 127.0.0.1/8 scope host lo
37-
valid_lft forever preferred_lft forever
38-
inet6 ::1/128 scope host
39-
valid_lft forever preferred_lft forever
40-
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
41-
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
42-
altname enp0s3
43-
altname ens3
44-
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic noprefixroute eth0
45-
valid_lft 86385sec preferred_lft 75585sec
46-
inet6 fec0::5054:ff:fe12:3456/64 scope site dynamic mngtmpaddr noprefixroute
47-
valid_lft 86385sec preferred_lft 14385sec
48-
inet6 fe80::5054:ff:fe12:3456/64 scope link
49-
valid_lft forever preferred_lft forever
50-
```
51-
52-
This will display the IP addresses assigned to your network interface(s),
53-
including the IP address of the installer. In the example output below, the
54-
installer's IP addresses are `10.0.2.15`, `fec0::5054:ff:fe12:3456`, and
55-
`fe80::5054:ff:fe12:3456%eth0`:
32+
You can then run `nixos-anywhere` like this:
5633

57-
To test if you can connect and your password works, you can use the following
58-
SSH command (replace the IP address with your own):
59-
60-
```
61-
ssh -v nixos@fec0::5054:ff:fe12:3456
62-
```
63-
64-
You can then use the IP address to run `nixos-anywhere` like this:
65-
66-
```
67-
nix run github:nix-community/nixos-anywhere -- --flake '.#myconfig' --target-host nixos@fec0::5054:ff:fe12:3456
34+
```shell
35+
nix --extra-experimental-features 'nix-command flakes' run github:nix-community/nixos-anywhere -- --flake '.#myconfig' --target-host nixos@localhost --build-on remote
6836
```
6937

7038
This example assumes a flake in the current directory containing a configuration

0 commit comments

Comments
 (0)