rebuild-local: don't check remote host when only building

This commit is contained in:
Sandro - 2022-09-17 22:16:08 +02:00
parent 91526b8803
commit 8dc5e6fad6
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 1 additions and 1 deletions

View File

@ -345,7 +345,7 @@
"${name}-nixos-rebuild-local" = pkgs.writeScriptBin "${name}-nixos-rebuild" ''
#!${pkgs.runtimeShell} -ex
[[ $(ssh ${target} cat /etc/hostname) == ${name} ]]
[[ $1 == build || $(ssh ${target} cat /etc/hostname) == ${name} ]]
${pkgs.nixos-rebuild}/bin/nixos-rebuild ${rebuildArg} --target-host ${target} --use-remote-sudo "$@"
'';