2step setup
This commit is contained in:
@@ -13,9 +13,9 @@ let
|
|||||||
mergedContainers = lib.concatMapAttrs (appName: app:
|
mergedContainers = lib.concatMapAttrs (appName: app:
|
||||||
lib.mapAttrs' (cName: cCfg: lib.nameValuePair "${appName}-${cName}" cCfg) app.runtime.containers
|
lib.mapAttrs' (cName: cCfg: lib.nameValuePair "${appName}-${cName}" cCfg) app.runtime.containers
|
||||||
) loadedContainers;
|
) loadedContainers;
|
||||||
allPathConfigs =
|
basePathConfigs =
|
||||||
(lib.mapAttrsToList (_: cfg: cfg) (lib.filterAttrs (name: _: name != "config" && name != "data") serverCfg.path))
|
lib.mapAttrsToList (_: cfg: cfg) (lib.filterAttrs (name: _: name != "config" && name != "data") serverCfg.path);
|
||||||
++ concatRuntimeLists "paths";
|
runtimePathConfigs = concatRuntimeLists "paths";
|
||||||
allSetupConfigs = map (app: ({ name = app.name; envFile = ""; } // app.runtime.setup)) appsList;
|
allSetupConfigs = map (app: ({ name = app.name; envFile = ""; } // app.runtime.setup)) appsList;
|
||||||
allCronsConfigs = concatRuntimeLists "cron";
|
allCronsConfigs = concatRuntimeLists "cron";
|
||||||
allVMConfigs = builtins.filter (app: app.runtime.vm != null) appsList;
|
allVMConfigs = builtins.filter (app: app.runtime.vm != null) appsList;
|
||||||
@@ -40,9 +40,13 @@ in {
|
|||||||
backend = "podman";
|
backend = "podman";
|
||||||
containers = mergedContainers;
|
containers = mergedContainers;
|
||||||
};
|
};
|
||||||
system.activationScripts.container-setup-dirs = {
|
system.activationScripts.container-setup-base-dirs = {
|
||||||
deps = [ "users" "groups" ];
|
deps = [ "users" "groups" ];
|
||||||
text = lib.concatStringsSep "\n" (map mkPathSetup allPathConfigs);
|
text = lib.concatStringsSep "\n" (map mkPathSetup basePathConfigs);
|
||||||
|
};
|
||||||
|
system.activationScripts.container-setup-runtime-dirs = {
|
||||||
|
deps = [ "container-setup-base-dirs" ];
|
||||||
|
text = lib.concatStringsSep "\n" (map mkPathSetup runtimePathConfigs);
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services = {
|
systemd.services = {
|
||||||
|
|||||||
Reference in New Issue
Block a user