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,8 +1,9 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
common = config.selfhosted.common;
|
||||
cfg = config.selfhosted.immich;
|
||||
rootCfg = config.selfhosted;
|
||||
common = rootCfg.common;
|
||||
moduleCfg = rootCfg.immich;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
@@ -13,7 +14,7 @@ in
|
||||
];
|
||||
|
||||
options.selfhosted.immich = {
|
||||
enable = mkEnableOption "Enable ${cfg.targetName} root target";
|
||||
enable = mkEnableOption "Enable ${moduleCfg.targetName} root target";
|
||||
targetName = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
@@ -22,16 +23,16 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = mkIf moduleCfg.enable {
|
||||
sops.secrets = {
|
||||
"immich/db_password" = { };
|
||||
"immich/client_id" = { };
|
||||
"immich/client_secret" = { };
|
||||
};
|
||||
|
||||
systemd.targets."${common.backend}-${cfg.targetName}" = {
|
||||
systemd.targets."${common.backend}-${moduleCfg.targetName}" = {
|
||||
unitConfig = {
|
||||
Description = "Root target for ${cfg.targetName}";
|
||||
Description = "Root target for ${moduleCfg.targetName}";
|
||||
};
|
||||
wantedBy = [ "${common.backend}-${common.rootTarget.name}.target" ];
|
||||
partOf = [ "${common.backend}-${common.rootTarget.name}.target" ];
|
||||
|
||||
Reference in new issue
Block a user