This commit is contained in:
soraefir
2026-06-04 00:52:50 +02:00
parent 9a89479f66
commit d2a402f724
6 changed files with 20 additions and 19 deletions

View File

@@ -41,15 +41,16 @@ in {
AUTHENTIK_POSTGRESQL__USER = "authentik_user"; AUTHENTIK_POSTGRESQL__USER = "authentik_user";
AUTHENTIK_POSTGRESQL__NAME = "authentik_db"; AUTHENTIK_POSTGRESQL__NAME = "authentik_db";
AUTHENTIK_POSAUTHENTIK_POSTGRESQL__SSLMODE = "false"; AUTHENTIK_POSAUTHENTIK_POSTGRESQL__SSLMODE = "false";
AUTHENTIK_EMAIL__HOST = serverCfg.mailDomain; AUTHENTIK_DISABLE_UPDATE_CHECK = "true";
AUTHENTIK_POSTGRESQL__SSLMODE = "disable";
} // lib.optionalAttrs (serverCfg.mail.server != null) {
AUTHENTIK_EMAIL__HOST = serverCfg.mail.server;
AUTHENTIK_EMAIL__PORT = "587"; AUTHENTIK_EMAIL__PORT = "587";
AUTHENTIK_EMAIL__USERNAME = "noreply@${serverCfg.domain}"; AUTHENTIK_EMAIL__USERNAME = "noreply@${serverCfg.domain}";
AUTHENTIK_EMAIL__USE_TLS = "true"; AUTHENTIK_EMAIL__USE_TLS = "true";
AUTHENTIK_EMAIL__USE_SSL = "false"; AUTHENTIK_EMAIL__USE_SSL = "false";
AUTHENTIK_EMAIL__TIMEOUT = "10"; AUTHENTIK_EMAIL__TIMEOUT = "10";
AUTHENTIK_EMAIL__FROM = "sso@noreply.${serverCfg.domain}"; AUTHENTIK_EMAIL__FROM = "sso@noreply.${serverCfg.domain}";
AUTHENTIK_DISABLE_UPDATE_CHECK = "true";
AUTHENTIK_POSTGRESQL__SSLMODE = "disable";
}; };
overrides = { overrides = {
environmentFiles = [ config.sops.secrets."AUTHENTIK".path config.sops.secrets."CUSTOM".path ] ; environmentFiles = [ config.sops.secrets."AUTHENTIK".path config.sops.secrets."CUSTOM".path ] ;

View File

@@ -28,7 +28,7 @@ in {
overrides = { overrides = {
volumes = [ volumes = [
"${serverCfg.path.book}:/calibre-library" "${serverCfg.path.book}:/calibre-library"
"${serverCfg.path.dlBook}:/cwa-book-ingest" "${serverCfg.path.download}/book:/cwa-book-ingest"
]; ];
}; };
}; };

View File

@@ -74,7 +74,7 @@ in {
} else {}); } else {});
extraLabels = { extraLabels = {
"traefik.http.routers.${containerCfg.subdomain}-login.rule" = "Host(`${containerCfg.subdomain}.${serverCfg.domain}`) && Path(`/user/login`) "; "traefik.http.routers.${containerCfg.subdomain}-login.rule" = "Host(`${containerCfg.subdomain}.${serverCfg.domain}`) && Path(`/user/login`) ";
"traefik.http.routers.${containerCfg.subdomain}-login.middlewares" = if (serverCfg.containers?authentik && containerCg.extra?proxyauth) then "authentik" else ""; "traefik.http.routers.${containerCfg.subdomain}-login.middlewares" = if (serverCfg.containers?authentik && containerCfg.extra?proxyauth) then "authentik" else "";
"traefik.http.routers.${containerCfg.subdomain}-login.priority" = "100"; "traefik.http.routers.${containerCfg.subdomain}-login.priority" = "100";
"traefik.http.routers.${containerCfg.subdomain}-login.entrypoints" = "web-secure"; "traefik.http.routers.${containerCfg.subdomain}-login.entrypoints" = "web-secure";
"traefik.http.routers.${containerCfg.subdomain}-login.tls" = "true"; "traefik.http.routers.${containerCfg.subdomain}-login.tls" = "true";

View File

@@ -80,7 +80,7 @@ in {
overrides = { overrides = {
volumes = [ volumes = [
"${serverCfg.path.dlComplete}:/books:rw" "${serverCfg.path.dlComplete}:/books:rw"
"${serverCfg.path.books}:/output:rw" "${serverCfg.path.book}:/output:rw"
"${serverCfg.path.config}/selfmark:/config:rw" "${serverCfg.path.config}/selfmark:/config:rw"
]; ];
}; };

View File

@@ -24,8 +24,8 @@ let
}; };
sharedVolumes = [ sharedVolumes = [
"${serverCfg.dataPath}/media:/media" # Fast hardlinking requires a single shared root "${serverCfg.path.data}/media:/media" # Fast hardlinking requires a single shared root
"${serverCfg.configPath}/servarr:/config-root" "${serverCfg.path.config}/servarr:/config-root"
]; ];
in in
assert containerCfg.subpath == null || throw "Error: Servarr does not support subpath."; assert containerCfg.subpath == null || throw "Error: Servarr does not support subpath.";
@@ -35,11 +35,11 @@ in
runtime = { runtime = {
paths = [ paths = [
{ path = "${serverCfg.dataPath}/media/"; mode = "0755"; } { path = "${serverCfg.path.data}/media/"; mode = "0755"; }
{ path = "${serverCfg.configPath}/servarr/prowlarr"; mode = "0755"; } { path = "${serverCfg.path.config}/servarr/prowlarr"; mode = "0755"; }
{ path = "${serverCfg.configPath}/servarr/radarr"; mode = "0755"; } { path = "${serverCfg.path.config}/servarr/radarr"; mode = "0755"; }
{ path = "${serverCfg.configPath}/servarr/sonarr"; mode = "0755"; } { path = "${serverCfg.path.config}/servarr/sonarr"; mode = "0755"; }
{ path = "${serverCfg.configPath}/servarr/lidarr"; mode = "0755"; } { path = "${serverCfg.path.config}/servarr/lidarr"; mode = "0755"; }
]; ];
containers = { containers = {
@@ -63,7 +63,7 @@ in
"--user=0:0" "--user=0:0"
"--passwd-entry=root:x:0:0:root:/root:/bin/sh" "--passwd-entry=root:x:0:0:root:/root:/bin/sh"
]; ];
overrides.volumes = sharedVolumes ++ [ "${serverCfg.configPath}/servarr/prowlarr:/config" ]; overrides.volumes = sharedVolumes ++ [ "${serverCfg.path.config}/servarr/prowlarr:/config" ];
}; };
}// lib.optionalAttrs (builtins.elem "radarr" (containerCfg.extra.modules or defaultModules)) { }// lib.optionalAttrs (builtins.elem "radarr" (containerCfg.extra.modules or defaultModules)) {
@@ -86,7 +86,7 @@ in
"--user=0:0" "--user=0:0"
"--passwd-entry=root:x:0:0:root:/root:/bin/sh" "--passwd-entry=root:x:0:0:root:/root:/bin/sh"
]; ];
overrides.volumes = sharedVolumes ++ [ "${serverCfg.configPath}/servarr/radarr:/config" ]; overrides.volumes = sharedVolumes ++ [ "${serverCfg.path.config}/servarr/radarr:/config" ];
}; };
}// lib.optionalAttrs (builtins.elem "sonarr" (containerCfg.extra.modules or defaultModules)) { }// lib.optionalAttrs (builtins.elem "sonarr" (containerCfg.extra.modules or defaultModules)) {
@@ -109,7 +109,7 @@ in
"--user=0:0" "--user=0:0"
"--passwd-entry=root:x:0:0:root:/root:/bin/sh" "--passwd-entry=root:x:0:0:root:/root:/bin/sh"
]; ];
overrides.volumes = sharedVolumes ++ [ "${serverCfg.configPath}/servarr/sonarr:/config" ]; overrides.volumes = sharedVolumes ++ [ "${serverCfg.path.config}/servarr/sonarr:/config" ];
}; };
}// lib.optionalAttrs (builtins.elem "lidarr" (containerCfg.extra.modules or defaultModules)) { }// lib.optionalAttrs (builtins.elem "lidarr" (containerCfg.extra.modules or defaultModules)) {
@@ -132,7 +132,7 @@ in
"--user=0:0" "--user=0:0"
"--passwd-entry=root:x:0:0:root:/root:/bin/sh" "--passwd-entry=root:x:0:0:root:/root:/bin/sh"
]; ];
overrides.volumes = sharedVolumes ++ [ "${serverCfg.configPath}/servarr/lidarr:/config" ]; overrides.volumes = sharedVolumes ++ [ "${serverCfg.path.config}/servarr/lidarr:/config" ];
}; };
}// lib.optionalAttrs (builtins.elem "readarr" (containerCfg.extra.modules or defaultModules)) { }// lib.optionalAttrs (builtins.elem "readarr" (containerCfg.extra.modules or defaultModules)) {

View File

@@ -4,8 +4,8 @@ let
in with lib; { in with lib; {
domain = mkOption { type = types.str; }; domain = mkOption { type = types.str; };
mail = { mail = {
domain = mkOption { type = types.str; default = null;}; domain = mkOption { type = types.nullOr types.str; default = null;};
server = mkOption { type = types.str; default = null;}; server = mkOption { type = types.nullOr types.str; default = null;};
}; };