Small modules config restructure
Changed variables names in every module
This commit is contained in:
1 parent
c1d2e52bf8
commit
c92b90e406
83 files changed
+616
-523
No files matched your search
@@ -1,10 +1,11 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
common = config.selfhosted.common;
|
||||
rootCfg = config.selfhosted.docs-manager;
|
||||
cfg = rootCfg.redis;
|
||||
hostDataPath = "${common.dataDir}/${rootCfg.paperless-ngx.name}";
|
||||
rootCfg = config.selfhosted;
|
||||
common = rootCfg.common;
|
||||
moduleCfg = rootCfg.docs-manager;
|
||||
cfg = moduleCfg.redis;
|
||||
hostDataPath = "${common.dataDir}/${moduleCfg.paperless-ngx.name}";
|
||||
in
|
||||
{
|
||||
options.selfhosted.docs-manager.redis = {
|
||||
@@ -13,7 +14,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf rootCfg.enable {
|
||||
config = mkIf moduleCfg.enable {
|
||||
virtualisation.oci-containers.containers."${cfg.name}" = {
|
||||
image = "docker.io/library/redis:7.4.11";
|
||||
volumes = [
|
||||
@@ -33,8 +34,8 @@ in
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 90 "always";
|
||||
};
|
||||
wantedBy = [ "${common.backend}-${rootCfg.targetName}.target" ];
|
||||
partOf = [ "${common.backend}-${rootCfg.targetName}.target" ];
|
||||
wantedBy = [ "${common.backend}-${moduleCfg.targetName}.target" ];
|
||||
partOf = [ "${common.backend}-${moduleCfg.targetName}.target" ];
|
||||
preStart = ''
|
||||
mkdir -p ${hostDataPath}/redis
|
||||
'';
|
||||
|
||||
Reference in new issue
Block a user