Use nixos-rebuild in all deploy scripts

otherwise nix-env is not run to create the profile which in turn also
does not create a bootloader entry.
This commit is contained in:
Sandro - 2022-08-22 22:13:53 +02:00
parent b7bc64e2df
commit 50d72bd5d3
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 2 additions and 3 deletions

View File

@ -270,15 +270,14 @@
nix copy --from https://hydra.hq.c3d2.de \
$TOPLEVEL
echo Activation on ${name}: "$@"
$TOPLEVEL/bin/switch-to-configuration "$@"
${pkgs.nixos-rebuild}/bin/nixos-rebuild --flake $TOPLEVEL@${name} "$@"
EOF
'';
"${name}-nixos-rebuild-local" = pkgs.writeScriptBin "${name}-nixos-rebuild" ''
#!${pkgs.runtimeShell} -ex
[[ $(ssh ${target} cat /etc/hostname) == ${name} ]]
nix copy --to ssh://${target} ${profile}
ssh ${target} "${profile}/bin/switch-to-configuration $*"
${pkgs.nixos-rebuild}/bin/nixos-rebuild ${rebuildArg} --target-host ${target} --use-remote-sudo "$@"
'';
"${name}-cleanup" = pkgs.writeScriptBin "${name}-cleanup" ''