|
1 | | -# Reference Manual: nixos-anywhere |
2 | | - |
3 | | -TODO: Populate this guide properly |
4 | | - |
5 | | -## Contents |
6 | | - |
7 | | -[Command Line Usage](#command-line-usage) |
8 | | - |
9 | | -[Developer guide](#developer-guide) |
10 | | - |
11 | | -[Explanation of known error messages](#explanation-of-known-error-messages) |
12 | | - |
13 | | -## Command Line Usage |
14 | | - |
15 | | -<!-- `$ bash ./src/nixos-anywhere.sh --help` --> |
16 | | -``` |
17 | | -Usage: nixos-anywhere [options] ssh-host |
18 | | -
|
19 | | -Options: |
20 | | -
|
21 | | -* -f, --flake flake |
22 | | - set the flake to install the system from |
23 | | -* -L, --print-build-logs |
24 | | - print full build logs |
25 | | -* -s, --store-paths |
26 | | - set the store paths to the disko-script and nixos-system directly |
27 | | - if this is give, flake is not needed |
28 | | -* --no-reboot |
29 | | - do not reboot after installation, allowing further customization of the target installation. |
30 | | -* --kexec url |
31 | | - use another kexec tarball to bootstrap NixOS |
32 | | -* --stop-after-disko |
33 | | - exit after disko formating, you can then proceed to install manually or some other way |
34 | | -* --extra-files files |
35 | | - files to copy into the new nixos installation |
36 | | -* --disk-encryption-keys remote_path local_path |
37 | | - copy the contents of the file or pipe in local_path to remote_path in the installer environment, |
38 | | - after kexec but before installation. Can be repeated. |
39 | | -* --no-substitute-on-destination |
40 | | - disable passing --substitute-on-destination to nix-copy |
41 | | -* --debug |
42 | | - enable debug output |
43 | | -* --option KEY VALUE |
44 | | - nix option to pass to every nix related command |
45 | | -* --from store-uri |
46 | | - URL of the source Nix store to copy the nixos and disko closure from |
47 | | -* --build-on-remote |
48 | | - build the closure on the remote machine instead of locally and copy-closuring it |
49 | | -``` |
50 | | - |
51 | | -## Developer guide |
52 | | - |
53 | | -To run `nixos-anywhere` from the repo: |
54 | | - |
55 | | -```shell |
56 | | -nix run . -- --help |
57 | | -``` |
58 | | - |
59 | | -To format the code |
60 | | - |
61 | | -```shell |
62 | | -nix fmt |
63 | | -``` |
64 | | - |
65 | | -## Explanation of known error messages |
66 | | - |
67 | | -TODO: List actual error messages and meanings. Include: |
68 | | - |
69 | | -If you do not have enough RAM you will see failures unpacking the initrd), this is because kexec needs to load the whole nixos into memory. |
| 1 | +# Reference Manual: nixos-anywhere |
| 2 | + |
| 3 | +TODO: Populate this guide properly |
| 4 | + |
| 5 | +## Contents |
| 6 | + |
| 7 | +[Command Line Usage](#command-line-usage) |
| 8 | + |
| 9 | +[Developer guide](#developer-guide) |
| 10 | + |
| 11 | +[Explanation of known error messages](#explanation-of-known-error-messages) |
| 12 | + |
| 13 | +## Command Line Usage |
| 14 | + |
| 15 | +<!-- `$ bash ./src/nixos-anywhere.sh --help` --> |
| 16 | + |
| 17 | +``` |
| 18 | +Usage: nixos-anywhere [options] ssh-host |
| 19 | +
|
| 20 | +Options: |
| 21 | +
|
| 22 | +* -f, --flake flake |
| 23 | + set the flake to install the system from |
| 24 | +* -L, --print-build-logs |
| 25 | + print full build logs |
| 26 | +* -s, --store-paths |
| 27 | + set the store paths to the disko-script and nixos-system directly |
| 28 | + if this is give, flake is not needed |
| 29 | +* --no-reboot |
| 30 | + do not reboot after installation, allowing further customization of the target installation. |
| 31 | +* --kexec url |
| 32 | + use another kexec tarball to bootstrap NixOS |
| 33 | +* --stop-after-disko |
| 34 | + exit after disko formating, you can then proceed to install manually or some other way |
| 35 | +* --extra-files files |
| 36 | + files to copy into the new nixos installation |
| 37 | +* --disk-encryption-keys remote_path local_path |
| 38 | + copy the contents of the file or pipe in local_path to remote_path in the installer environment, |
| 39 | + after kexec but before installation. Can be repeated. |
| 40 | +* --no-substitute-on-destination |
| 41 | + disable passing --substitute-on-destination to nix-copy |
| 42 | +* --debug |
| 43 | + enable debug output |
| 44 | +* --option KEY VALUE |
| 45 | + nix option to pass to every nix related command |
| 46 | +* --from store-uri |
| 47 | + URL of the source Nix store to copy the nixos and disko closure from |
| 48 | +* --build-on-remote |
| 49 | + build the closure on the remote machine instead of locally and copy-closuring it |
| 50 | +``` |
| 51 | + |
| 52 | +## Developer guide |
| 53 | + |
| 54 | +To run `nixos-anywhere` from the repo: |
| 55 | + |
| 56 | +```shell |
| 57 | +nix run . -- --help |
| 58 | +``` |
| 59 | + |
| 60 | +To format the code |
| 61 | + |
| 62 | +```shell |
| 63 | +nix fmt |
| 64 | +``` |
| 65 | + |
| 66 | +## Explanation of known error messages |
| 67 | + |
| 68 | +TODO: List actual error messages and meanings. Include: |
| 69 | + |
| 70 | +If you do not have enough RAM you will see failures unpacking the initrd), this is because kexec needs to load the whole nixos into memory. |
0 commit comments