From f6ffbb41633728942b556bbff05a42c37f4e8e3d Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 11 Jul 2022 23:00:50 +0200 Subject: [PATCH] flake.nix: only allow deploy scripts depending on c3d2.deployment.server --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index dbe225f5..b6c35b97 100644 --- a/flake.nix +++ b/flake.nix @@ -272,7 +272,7 @@ #!${pkgs.runtimeShell} -ex ssh ${target} "time nix-collect-garbage -d && time nix-store --optimise" ''; - } // lib.optionalAttrs (hostConfig ? c3d2.deployment.server) { + } // lib.optionalAttrs (builtins.elem (hostConfig.c3d2.deployment.server or null) [ "server9" "server10" ]) { "microvm-update-${name}" = pkgs.writeScriptBin "microvm-update-${name}" '' #!${pkgs.runtimeShell} -e ${hostConfig.system.build.copyToServer} ${self} ${secrets} @@ -296,7 +296,7 @@ systemctl restart microvm@${name}.service END ''; - + } // lib.optionalAttrs (hostConfig.c3d2.deployment.server or null == "nomad") { "microvm-update-${name}-local" = pkgs.writeScriptBin "microvm-update-${name}" '' #!${pkgs.runtimeShell} -e ${hostConfig.system.build.copyToServer} ${hostConfig.microvm.declaredRunner}