diff --git a/nixos/doc/manual/man-nixos-rebuild.xml b/nixos/doc/manual/man-nixos-rebuild.xml index c529737c3bf3..a8d20c0f6579 100644 --- a/nixos/doc/manual/man-nixos-rebuild.xml +++ b/nixos/doc/manual/man-nixos-rebuild.xml @@ -281,6 +281,51 @@ $ nixos-rebuild switch -p test -I nixos-config=./test.nix + + + + Instead of building the new configuration locally, use the + specified host to perform the build. The host needs to be accessible + with ssh, and must be able to perform Nix builds. If the option + is not set, the build will be copied back + to the local machine when done. + + Note that, if is not specified, + Nix will be built both locally and remotely. This is because the + configuration will always be evaluated locally even though the building + might be performed remotely. + + You can include a remote user name in + the host name (user@host). You can also set + ssh options by defining the NIX_SSHOPTS environment + variable. + + + + + + + Specifies the NixOS target host. By setting this to something other + than localhost, the system activation will + happen on the remote host instead of the local machine. The remote host + needs to be accessible over ssh, and for the commands + , and + you need root access. + + If is not explicitly + specified, will implicitly be set to the + same value as . So, if you only specify + both building and activation will take + place remotely (and no build artifacts will be copied to the local + machine). + + You can include a remote user name in + the host name (user@host). You can also set + ssh options by defining the NIX_SSHOPTS environment + variable. + + + In addition, nixos-rebuild accepts various @@ -305,6 +350,13 @@ the Nix manual for details. + NIX_SSHOPTS + + Additional options to be passed to + ssh on the command line. + + +