Use target nixos-rebuild on target machine
This is required when using a modified nixos-rebuild that crashes when using the executable from the currently deployed system.
This commit is contained in:
parent
c22fb2b034
commit
f270bef4a1
|
@ -110,7 +110,10 @@ lib.attrsets.mapAttrs
|
|||
#!${pkgs.runtimeShell} -ex
|
||||
[[ $(ssh ${target} cat /etc/hostname) == ${name} ]]
|
||||
nix copy --no-check-sigs --to ssh-ng://${target} ${inputPaths}
|
||||
ssh ${target} nixos-rebuild ${rebuildArg} "$@"
|
||||
# use nixos-rebuild from target config
|
||||
nixosRebuild=$(nix build ${self}#nixosConfigurations.${name}.config.system.build.nixos-rebuild --no-link --json | ${pkgs.jq}/bin/jq -r '.[0].outputs.out')
|
||||
nix copy --no-check-sigs --to ssh-ng://${target} $nixosRebuild
|
||||
ssh ${target} $nixosRebuild/bin/nixos-rebuild ${rebuildArg} "$@"
|
||||
'';
|
||||
|
||||
"${name}-nixos-rebuild-hydra" = pkgs.writeScriptBin "${name}-nixos-rebuild" ''
|
||||
|
|
Loading…
Reference in New Issue