diff --git a/nixos/doc/manual/man-nixos-rebuild.xml b/nixos/doc/manual/man-nixos-rebuild.xml index 551a65f5e96b..5e66946aa5be 100644 --- a/nixos/doc/manual/man-nixos-rebuild.xml +++ b/nixos/doc/manual/man-nixos-rebuild.xml @@ -13,35 +13,35 @@ - nixos-rebuild + nixos-rebuild - + - + - + - + - + - + - + @@ -50,29 +50,33 @@ - + - + - + - + + + + builder-spec + - + - + @@ -315,6 +319,27 @@ $ ./result/bin/run-*-vm + + + + builder-spec + + + + Allow to specify remote builders ad-hoc for building the new system. + This requires the user executing nixos-rebuild (usually + root) to be configured as a trusted user in the Nix daemon. This can be + achived by using the nix.trustedUsers NixOS option. + Examples values for that option are described in the + Remote builds chapter in the Nix manual, + (i.e. --builders "ssh://bigbrother x86_64-linux"). + By specifying an empty string existing builders specified in + /etc/nix/machines can be ignored: + --builders "" for example when they are not + reachable due to network connectivity. + + + diff --git a/nixos/modules/installer/tools/nixos-rebuild.sh b/nixos/modules/installer/tools/nixos-rebuild.sh index 2af73519bc52..361c2e49e05c 100644 --- a/nixos/modules/installer/tools/nixos-rebuild.sh +++ b/nixos/modules/installer/tools/nixos-rebuild.sh @@ -53,11 +53,11 @@ while [ "$#" -gt 0 ]; do repair=1 extraBuildFlags+=("$i") ;; - --max-jobs|-j|--cores|-I) + --max-jobs|-j|--cores|-I|--builders) j="$1"; shift 1 extraBuildFlags+=("$i" "$j") ;; - --show-trace|--no-build-hook|--keep-failed|-K|--keep-going|-k|--verbose|-v|-vv|-vvv|-vvvv|-vvvvv|--fallback|--repair|--no-build-output|-Q|-j*) + --show-trace|--keep-failed|-K|--keep-going|-k|--verbose|-v|-vv|-vvv|-vvvv|-vvvvv|--fallback|--repair|--no-build-output|-Q|-j*) extraBuildFlags+=("$i") ;; --option)