flake.nix: only allow deploy scripts depending on c3d2.deployment.server
This commit is contained in:
parent
4d54ec26b1
commit
f6ffbb4163
|
@ -272,7 +272,7 @@
|
||||||
#!${pkgs.runtimeShell} -ex
|
#!${pkgs.runtimeShell} -ex
|
||||||
ssh ${target} "time nix-collect-garbage -d && time nix-store --optimise"
|
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}" ''
|
"microvm-update-${name}" = pkgs.writeScriptBin "microvm-update-${name}" ''
|
||||||
#!${pkgs.runtimeShell} -e
|
#!${pkgs.runtimeShell} -e
|
||||||
${hostConfig.system.build.copyToServer} ${self} ${secrets}
|
${hostConfig.system.build.copyToServer} ${self} ${secrets}
|
||||||
|
@ -296,7 +296,7 @@
|
||||||
systemctl restart microvm@${name}.service
|
systemctl restart microvm@${name}.service
|
||||||
END
|
END
|
||||||
'';
|
'';
|
||||||
|
} // lib.optionalAttrs (hostConfig.c3d2.deployment.server or null == "nomad") {
|
||||||
"microvm-update-${name}-local" = pkgs.writeScriptBin "microvm-update-${name}" ''
|
"microvm-update-${name}-local" = pkgs.writeScriptBin "microvm-update-${name}" ''
|
||||||
#!${pkgs.runtimeShell} -e
|
#!${pkgs.runtimeShell} -e
|
||||||
${hostConfig.system.build.copyToServer} ${hostConfig.microvm.declaredRunner}
|
${hostConfig.system.build.copyToServer} ${hostConfig.microvm.declaredRunner}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user