@@ -8,9 +8,12 @@ Usage: nixos-anywhere [options] [<ssh-host>]
8
8
Options:
9
9
10
10
* -f, --flake <flake_uri>
11
- set the flake to install the system from.
11
+ set the flake to install the system from. i.e.
12
+ nixos-anywhere --flake .#mymachine
13
+ Also supports variants:
14
+ nixos-anywhere --flake .#nixosConfigurations.mymachine.config.virtualisation.vmVariant
12
15
* --target-host <ssh-host>
13
- specified the SSH target host to deploy onto.
16
+ set the SSH target host to deploy onto.
14
17
* -i <identity_file>
15
18
selects which SSH private key file to use.
16
19
* -p, --ssh-port <ssh_port>
@@ -26,8 +29,6 @@ Options:
26
29
* -s, --store-paths <disko-script> <nixos-system>
27
30
set the store paths to the disko-script and nixos-system directly
28
31
if this is given, flake is not needed
29
- * --no-reboot
30
- do not reboot after installation, allowing further customization of the target installation.
31
32
* --kexec <path>
32
33
use another kexec tarball to bootstrap NixOS
33
34
* --kexec-extra-flags
@@ -38,18 +39,24 @@ Options:
38
39
after kexec is executed, use a custom ssh port to connect. Defaults to 22
39
40
* --copy-host-keys
40
41
copy over existing /etc/ssh/ssh_host_* host keys to the installation
41
- * --stop-after-disko
42
- exit after disko formatting, you can then proceed to install manually or some other way
43
42
* --extra-files <path>
44
43
contents of local <path> are recursively copied to the root (/) of the new NixOS installation. Existing files are overwritten
45
- Copied files will be owned by root. See documentation for details.
44
+ Copied files will be owned by root unless specified by --chown option. See documentation for details.
45
+ * --chown <path> <ownership>
46
+ change ownership of <path> recursively. Recommended to use uid:gid as opposed to username:groupname for ownership.
47
+ Option can be specified more than once.
46
48
* --disk-encryption-keys <remote_path> <local_path>
47
49
copy the contents of the file or pipe in local_path to remote_path in the installer environment,
48
50
after kexec but before installation. Can be repeated.
49
51
* --no-substitute-on-destination
50
52
disable passing --substitute-on-destination to nix-copy
53
+ implies --no-use-machine-substituters
54
+ * --no-use-machine-substituters
55
+ don't copy the substituters from the machine to be installed into the installer environment
51
56
* --debug
52
57
enable debug output
58
+ * --show-trace
59
+ show nix build traces
53
60
* --option <key> <value>
54
61
nix option to pass to every nix related command
55
62
* --from <store-uri>
@@ -58,6 +65,22 @@ Options:
58
65
build the closure on the remote machine instead of locally and copy-closuring it
59
66
* --vm-test
60
67
build the system and test the disk configuration inside a VM without installing it to the target.
68
+ * --generate-hardware-config nixos-facter|nixos-generate-config <path>
69
+ generate a hardware-configuration.nix file using the specified backend and write it to the specified path.
70
+ The backend can be either 'nixos-facter' or 'nixos-generate-config'.
71
+ * --phases
72
+ comma separated list of phases to run. Default is: kexec,disko,install,reboot
73
+ kexec: kexec into the nixos installer
74
+ disko: first unmount and destroy all filesystems on the disks we want to format, then run the create and mount mode
75
+ install: install the system
76
+ reboot: unmount the filesystems, export any ZFS pools and reboot the machine
77
+ * --disko-mode disko|mount|format
78
+ set the disko mode to format, mount or destroy. Default is disko.
79
+ disko: first unmount and destroy all filesystems on the disks we want to format, then run the create and mount mode
80
+ * --no-disko-deps
81
+ This will only upload the disko script and not the partitioning tools dependencies.
82
+ Installers usually have dependencies available.
83
+ Use this option if your target machine has not enough RAM to store the dependencies in memory.
61
84
* --build-on auto|remote|local
62
85
sets the build on settings to auto, remote or local. Default is auto.
63
86
auto: tries to figure out, if the build is possible on the local host, if not falls back gracefully to remote build
0 commit comments