packages: fix cross nixos-rebuild

This commit is contained in:
Sandro - 2023-11-11 04:28:51 +01:00
parent 345b3a5a9d
commit 6980fd146d
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 1 additions and 2 deletions

View File

@ -96,7 +96,6 @@ lib.attrsets.mapAttrs
target = ''root@"${host}"'';
rebuildArg = "--flake ${self}#${name} ${overrideInputsArgs} --accept-flake-config";
hostConfig = self.nixosConfigurations."${name}".config;
hostPkgs = self.nixosConfigurations."${name}".pkgs;
declaredRunnerDrvPath = discardStringCtx hostConfig.microvm.declaredRunner.drvPath;
toplevelDrvPath = discardStringCtx hostConfig.system.build.toplevel.drvPath;
toplevelOutPath = discardStringCtx hostConfig.system.build.toplevel.outPath;
@ -160,7 +159,7 @@ lib.attrsets.mapAttrs
[[ ''${1:-} == build || $(ssh ${target} cat /etc/hostname) == ${name} ]]
# don't re-execute, otherwise we run the targetPlatform locally
_NIXOS_REBUILD_REEXEC=1 ${lib.getExe hostPkgs.nixos-rebuild} ${rebuildArg} --target-host ${target} --use-remote-sudo "$@"
_NIXOS_REBUILD_REEXEC=1 ${lib.getExe pkgs.nixos-rebuild} ${rebuildArg} --target-host ${target} --use-remote-sudo "$@"
'';
"${name}-cleanup" = pkgs.writeScriptBin "${name}-cleanup" ''