2022-12-21 21:34:34 +03:00
|
|
|
# CLI
|
|
|
|
|
|
|
|
```
|
2024-06-30 16:49:04 +03:00
|
|
|
Usage: nixos-anywhere [options] <ssh-host>
|
2022-12-21 21:34:34 +03:00
|
|
|
|
|
|
|
Options:
|
|
|
|
|
2024-06-30 16:49:04 +03:00
|
|
|
* -f, --flake <flake_uri>
|
|
|
|
set the flake to install the system from.
|
|
|
|
* -i <identity_file>
|
|
|
|
selects which SSH private key file to use.
|
|
|
|
* -p, --ssh-port <ssh_port>
|
|
|
|
set the ssh port to connect with
|
|
|
|
* --ssh-option <ssh_option>
|
|
|
|
set an ssh option
|
|
|
|
* -L, --print-build-logs
|
|
|
|
print full build logs
|
|
|
|
* --env-password
|
|
|
|
set a password used by ssh-copy-id, the password should be set by
|
|
|
|
the environment variable SSH_PASS
|
|
|
|
* -s, --store-paths <disko-script> <nixos-system>
|
2022-12-21 21:34:34 +03:00
|
|
|
set the store paths to the disko-script and nixos-system directly
|
2024-05-15 18:36:08 +03:00
|
|
|
if this is given, flake is not needed
|
2024-06-30 16:49:04 +03:00
|
|
|
* --no-reboot
|
|
|
|
do not reboot after installation, allowing further customization of the target installation.
|
|
|
|
* --kexec <path>
|
2022-12-21 21:34:34 +03:00
|
|
|
use another kexec tarball to bootstrap NixOS
|
2024-06-30 16:49:04 +03:00
|
|
|
* --kexec-extra-flags
|
|
|
|
extra flags to add into the call to kexec, e.g. "--no-sync"
|
|
|
|
* --post-kexec-ssh-port <ssh_port>
|
|
|
|
after kexec is executed, use a custom ssh port to connect. Defaults to 22
|
|
|
|
* --copy-host-keys
|
|
|
|
copy over existing /etc/ssh/ssh_host_* host keys to the installation
|
|
|
|
* --stop-after-disko
|
|
|
|
exit after disko formatting, you can then proceed to install manually or some other way
|
|
|
|
* --extra-files <path>
|
|
|
|
path to a directory to copy into the root of the new nixos installation.
|
|
|
|
Copied files will be owned by root.
|
|
|
|
* --disk-encryption-keys <remote_path> <local_path>
|
|
|
|
copy the contents of the file or pipe in local_path to remote_path in the installer environment,
|
|
|
|
after kexec but before installation. Can be repeated.
|
|
|
|
* --no-substitute-on-destination
|
|
|
|
disable passing --substitute-on-destination to nix-copy
|
2022-12-21 21:34:34 +03:00
|
|
|
* --debug
|
|
|
|
enable debug output
|
2024-06-30 16:49:04 +03:00
|
|
|
* --option <key> <value>
|
|
|
|
nix option to pass to every nix related command
|
|
|
|
* --from <store-uri>
|
|
|
|
URL of the source Nix store to copy the nixos and disko closure from
|
|
|
|
* --build-on-remote
|
|
|
|
build the closure on the remote machine instead of locally and copy-closuring it
|
|
|
|
* --vm-test
|
|
|
|
build the system and test the disk configuration inside a VM without installing it to the target.
|
2022-12-21 21:34:34 +03:00
|
|
|
```
|