Fix condition, add a few echos to make debugging easier

This commit is contained in:
Sandro - 2023-10-26 20:06:16 +02:00
parent b1fd6cf274
commit 73e4cc7eb3
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 6 additions and 2 deletions

View File

@ -192,6 +192,7 @@ lib.attrsets.mapAttrs
${hostConfig.system.build.copyToServer} ${inputPaths} ${declaredRunnerDrvPath}
${hostConfig.system.build.runOnServer} bash -e <<END
set -eou pipefail
${createDirsCopyCurrent name}
nix build -L --accept-flake-config -o current ${overrideInputsArgs} ${declaredRunnerDrvPath}
@ -199,12 +200,14 @@ lib.attrsets.mapAttrs
${createSymlinks name}
if [[ -z NIXOS_REBUILD ]]; then
if [[ -n NIXOS_REBUILD ]]; then
echo "Restarting MicroVM..."
systemctl restart microvm@${name}.service
fi
END
if [[ -n NIXOS_REBUILD ]]; then
if [[ -z NIXOS_REBUILD ]]; then
echo "Switching to configuration..."
ssh ${target} -- ${toplevelOutPath}/bin/switch-to-configuration "''${@:-switch}"
fi
''
@ -222,6 +225,7 @@ lib.attrsets.mapAttrs
${hostConfig.system.build.copyToServer} ${declaredRunnerDrvPath}
${hostConfig.system.build.runOnServer} bash -e <<END
set -eou pipefail
${createDirsCopyCurrent name}
ln -sfT ${hostConfig.microvm.declaredRunner} current