Fix condition, add a few echos to make debugging easier
This commit is contained in:
parent
b1fd6cf274
commit
73e4cc7eb3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue