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