Fix *-nixos-rebuild-local re-execing to wrong platform
This commit is contained in:
parent
f270bef4a1
commit
d610e62537
|
@ -142,7 +142,8 @@ lib.attrsets.mapAttrs
|
|||
"${name}-nixos-rebuild-local" = pkgs.writeScriptBin "${name}-nixos-rebuild" ''
|
||||
#!${pkgs.runtimeShell} -ex
|
||||
[[ $1 == build || $(ssh ${target} cat /etc/hostname) == ${name} ]]
|
||||
${pkgs.nixos-rebuild}/bin/nixos-rebuild ${rebuildArg} --target-host ${target} --use-remote-sudo "$@"
|
||||
# don't re-execute, otherwise we run the targetPlatform locally
|
||||
_NIXOS_REBUILD_REEXEC=1 ${pkgs.nixos-rebuild}/bin/nixos-rebuild ${rebuildArg} --target-host ${target} --use-remote-sudo "$@"
|
||||
'';
|
||||
|
||||
"${name}-cleanup" = pkgs.writeScriptBin "${name}-cleanup" ''
|
||||
|
|
Loading…
Reference in New Issue