diff options
author | Fabian Möller <fabianm88@gmail.com> | 2023-01-13 10:16:46 +0100 |
---|---|---|
committer | Fabian Möller <fabianm88@gmail.com> | 2023-01-13 10:16:46 +0100 |
commit | cc4de1aa3ad39c480e111113aec48da2e7c24e8d (patch) | |
tree | 19aac8395ed6f3848829d2e39cacde23b404201a /pkgs/os-specific/linux/nixos-rebuild | |
parent | 16b20a5c98d78711d72ca8ac19edfa26b56eb3d6 (diff) |
nixos-rebuild: Allow local builds when --target-host is used again
This is a followup of #148921, to allow local builds when `--target-host` is used again. It also documents the change in behavior, regarding the specialty of the `localhost` value. By removing the special handling of an empty `buildHost` and non empty `targetHost`, this change also slightly alters the behavior of `nixos-rebuild`. Originally by specifying `--target-host target --build-host ""`, the now removed special case would transform those arguments to `--target-host target --build-host target`. Now the empty `--build-host` would result in a local build.
Diffstat (limited to 'pkgs/os-specific/linux/nixos-rebuild')
-rwxr-xr-x | pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh index 217e04d35720e..ed7c9231905a3 100755 --- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh +++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh @@ -148,10 +148,6 @@ if [[ -n "$SUDO_USER" || -n $remoteSudo ]]; then maybeSudo=(sudo --preserve-env="$preservedSudoVars" --) fi -if [[ -z "$buildHost" && -n "$targetHost" ]]; then - buildHost="$targetHost" -fi - # log the given argument to stderr if verbose mode is on logVerbose() { if [ -n "$verboseScript" ]; then |