diff --git a/flake.nix b/flake.nix index 08757593..a672a52d 100644 --- a/flake.nix +++ b/flake.nix @@ -363,9 +363,15 @@ #!${pkgs.runtimeShell} -ex ssh ${target} "time nix-collect-garbage -d && time nix-store --optimise" ''; - } // lib.optionalAttrs (builtins.elem (hostConfig.c3d2.deployment.server or null) [ "server9" "server10" ]) { + "microvm-update-${name}" = pkgs.writeScriptBin "microvm-update-${name}" '' #!${pkgs.runtimeShell} -e + + ${lib.optionalString (! builtins.elem (hostConfig.c3d2.deployment.server or null) [ "server9" "server10" ]) '' + echo "MicroVM must be configured to proper server" >&2 + exit 1 + ''} + ${hostConfig.system.build.copyToServer} ${inputPaths} ${hostConfig.system.build.runOnServer} bash -e <&2 + exit 1 + ''} + ${hostConfig.system.build.copyToServer} ${hostConfig.microvm.declaredRunner} ${hostConfig.system.build.runOnServer} bash -e <&2 + exit 1 + ''} + echo Copying Flakes nix copy --no-check-sigs --to ssh-ng://root@hydra.serv.zentralwerk.org ${secrets} ${self}