summary refs log tree commit diff
path: root/pkgs/os-specific/linux/nixos-rebuild
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2021-06-11 09:50:40 -0700
committerJonathan Ringer <jonringer117@gmail.com>2021-06-11 10:01:21 -0700
commit3d34fe9f2b55e29721fa0c0c8ad677c0bf064e3e (patch)
tree3627ac3a17bdd13cfa78620f0bbf9e02f44e9cfe /pkgs/os-specific/linux/nixos-rebuild
parentad502ab5c59a49eaf0c92f90201dffd4255a005a (diff)
downloadnixpkgs-3d34fe9f2b55e29721fa0c0c8ad677c0bf064e3e.tar
nixpkgs-3d34fe9f2b55e29721fa0c0c8ad677c0bf064e3e.tar.gz
nixpkgs-3d34fe9f2b55e29721fa0c0c8ad677c0bf064e3e.tar.bz2
nixpkgs-3d34fe9f2b55e29721fa0c0c8ad677c0bf064e3e.tar.lz
nixpkgs-3d34fe9f2b55e29721fa0c0c8ad677c0bf064e3e.tar.xz
nixpkgs-3d34fe9f2b55e29721fa0c0c8ad677c0bf064e3e.tar.zst
nixpkgs-3d34fe9f2b55e29721fa0c0c8ad677c0bf064e3e.zip
nixos-rebuild: default buildHost to localhost
Prior to #119540, the toplevel output was built
locally then pushed to the remote host when using
the command:

nixos-rebuild --flake <flake> --target-host remote.host

However, buildHost would default to targetHost when
only --target-host was supplied. This caused the .drv
closure to always be transferred unless --build-host=localhost
is supplied.

This change restores the previous build local default behavior.
TargetHost can still build the outputs, if explicitly mentioned:

nixos-rebuild --flake <flake> \
  --target-host remote.host \
  --build-host  remote.host
Diffstat (limited to 'pkgs/os-specific/linux/nixos-rebuild')
-rw-r--r--pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
index 7441be07af3..9da077634f5 100644
--- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
+++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
@@ -26,7 +26,7 @@ upgrade=
 upgrade_all=
 repair=
 profile=/nix/var/nix/profiles/system
-buildHost=
+buildHost=localhost
 targetHost=
 maybeSudo=()