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