Compare commits

...

2 Commits

Author SHA1 Message Date
Markus Schmidl 3b3c7c23f3 disable monitoring on tetra-zw 2023-11-29 15:11:55 +01:00
Markus Schmidl f39f0f7e06 fix deploy scripts 2023-11-29 15:03:45 +01:00
3 changed files with 12 additions and 9 deletions

View File

@ -25,4 +25,6 @@
services.resolved.dnssec = "false";
system.stateVersion = "23.05";
deployment-TLMS.monitoring.enable = registry.monitoring;
}

View File

@ -15,7 +15,7 @@ let
host = system.config.networking.hostName;
in
(pkgs.writeScriptBin "deploy" ''
(pkgs.writeScript "deploy-${command}-${host}" ''
#!${pkgs.runtimeShell}
set -e
@ -37,7 +37,7 @@ let
ip = system._module.specialArgs.registry.wgAddr4;
host = system.config.networking.hostName;
in
(pkgs.writeScriptBin "deploy" ''
(pkgs.writeScript "collect-garbage-${host}" ''
#!${pkgs.runtimeShell}
set -e
@ -59,7 +59,7 @@ let
ip = system._module.specialArgs.registry.wgAddr4;
host = system.config.networking.hostName;
in
(pkgs.writeScriptBin "deploy" ''
(pkgs.writeScript "reboot-${host}" ''
#!${pkgs.runtimeShell}
set -e
@ -88,14 +88,14 @@ let
rebootScripts = lib.mapAttrs' (name: system: lib.nameValuePair ("reboot-" + name) (reboot system)) nonVmHosts;
## all at once
switchAll = lib.strings.concatMapStringsSep "\n" (path: "${path}/bin/deploy") (builtins.attrValues switchInstallScripts);
bootAll = lib.strings.concatMapStringsSep "\n" (path: "${path}/bin/deploy") (builtins.attrValues bootInstallScripts);
rebootAll = lib.strings.concatMapStringsSep "\n" (path: "${path}/bin/deploy") (builtins.attrValues rebootScripts);
garbageAll = lib.strings.concatMapStringsSep "\n" (path: "${path}/bin/deploy") (builtins.attrValues garbageCollectScripts);
switchAll = lib.strings.concatStringsSep "\n" (builtins.attrValues switchInstallScripts);
bootAll = lib.strings.concatStringsSep "\n" (builtins.attrValues bootInstallScripts);
rebootAll = lib.strings.concatStringsSep "\n" (builtins.attrValues rebootScripts);
garbageAll = lib.strings.concatStringsSep "\n" (builtins.attrValues garbageCollectScripts);
nukeAll = lib.mapAttrs'
(name: scripts:
lib.nameValuePair (name) (pkgs.writeScriptBin "${name}" ''
lib.nameValuePair (name) (pkgs.writeScript "${name}" ''
#!${pkgs.runtimeShell}
set -x
@ -113,6 +113,6 @@ in
builtins.mapAttrs
(name: value: {
type = "app";
program = "${value}/bin/deploy";
program = "${value}";
})
allPackages

View File

@ -50,5 +50,6 @@
wgAddr4 = "10.13.37.11";
wireguardPublicKey = "ksztvj780MFau9YH0hBOL+/PzYb/EaARCUqR+EUIL2o=";
publicWireguardEndpoint = null;
monitoring = false;
};
}