nixos-rebuild: fix --install-bootloader flag with systemd-run

Changed files
+7 -1
pkgs
os-specific
linux
nixos-rebuild
+7 -1
pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
···
cmd=(
"systemd-run"
"-E" "LOCALE_ARCHIVE" # Will be set to new value early in switch-to-configuration script, but interpreter starts out with old value
"--collect"
"--no-ask-password"
"--pty"
···
cmd=()
elif ! targetHostCmd "${cmd[@]}" true &>/dev/null; then
logVerbose "Skipping systemd-run to switch configuration since it is not working in target host."
-
cmd=("env" "-i" "LOCALE_ARCHIVE=$LOCALE_ARCHIVE")
else
logVerbose "Using systemd-run to switch configuration."
fi
···
cmd=(
"systemd-run"
"-E" "LOCALE_ARCHIVE" # Will be set to new value early in switch-to-configuration script, but interpreter starts out with old value
+
"-E" "NIXOS_INSTALL_BOOTLOADER"
"--collect"
"--no-ask-password"
"--pty"
···
cmd=()
elif ! targetHostCmd "${cmd[@]}" true &>/dev/null; then
logVerbose "Skipping systemd-run to switch configuration since it is not working in target host."
+
cmd=(
+
"env"
+
"-i"
+
"LOCALE_ARCHIVE=$LOCALE_ARCHIVE"
+
"NIXOS_INSTALL_BOOTLOADER=$NIXOS_INSTALL_BOOTLOADER"
+
)
else
logVerbose "Using systemd-run to switch configuration."
fi