fix auth midleware
This commit is contained in:
@@ -2,6 +2,10 @@
|
|||||||
let
|
let
|
||||||
serverCfg = config.syscfg.server;
|
serverCfg = config.syscfg.server;
|
||||||
version = "latest";
|
version = "latest";
|
||||||
|
|
||||||
|
routerName = if containerCfg.subpath != null
|
||||||
|
then "${containerCfg.subdomain}-${lib.strings.sanitizeDerivationName containerCfg.subpath}"
|
||||||
|
else containerCfg.subdomain;
|
||||||
in {
|
in {
|
||||||
|
|
||||||
paths = [{
|
paths = [{
|
||||||
@@ -27,7 +31,7 @@ in {
|
|||||||
AUTOMATED_CONVERSION_OUTPUT_SUBDIR = "SAME_AS_SRC";
|
AUTOMATED_CONVERSION_OUTPUT_SUBDIR = "SAME_AS_SRC";
|
||||||
};
|
};
|
||||||
extraLabels = { } // (if serverCfg.containers ? authentik then {
|
extraLabels = { } // (if serverCfg.containers ? authentik then {
|
||||||
"traefik.http.routers.${containerCfg.subdomain}.middlewares" = "authentik";
|
"traefik.http.routers.${routerName}.middlewares" = "authentik";
|
||||||
} else {});
|
} else {});
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--tmpfs=/tmp:rw,noexec,nosuid,size=512m"
|
"--tmpfs=/tmp:rw,noexec,nosuid,size=512m"
|
||||||
|
|||||||
@@ -60,6 +60,9 @@ in
|
|||||||
"--tmpfs=/tmp:rw,noexec,nosuid,size=512m"
|
"--tmpfs=/tmp:rw,noexec,nosuid,size=512m"
|
||||||
"--passwd-entry=root:x:0:0:root:/root:/bin/sh"
|
"--passwd-entry=root:x:0:0:root:/root:/bin/sh"
|
||||||
];
|
];
|
||||||
|
extraLabels = { } // (if serverCfg.containers ? authentik then {
|
||||||
|
"traefik.http.routers.${containerCfg.subdomain}-prowlarr.middlewares" = "authentik";
|
||||||
|
} else {});
|
||||||
overrides.volumes = sharedVolumes ++ [ "${serverCfg.configPath}/servarr/prowlarr:/config" ];
|
overrides.volumes = sharedVolumes ++ [ "${serverCfg.configPath}/servarr/prowlarr:/config" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -82,6 +85,9 @@ in
|
|||||||
"--tmpfs=/tmp:rw,noexec,nosuid,size=512m"
|
"--tmpfs=/tmp:rw,noexec,nosuid,size=512m"
|
||||||
"--passwd-entry=root:x:0:0:root:/root:/bin/sh"
|
"--passwd-entry=root:x:0:0:root:/root:/bin/sh"
|
||||||
];
|
];
|
||||||
|
extraLabels = { } // (if serverCfg.containers ? authentik then {
|
||||||
|
"traefik.http.routers.${containerCfg.subdomain}-radarr.middlewares" = "authentik";
|
||||||
|
} else {});
|
||||||
overrides.volumes = sharedVolumes ++ [ "${serverCfg.configPath}/servarr/radarr:/config" ];
|
overrides.volumes = sharedVolumes ++ [ "${serverCfg.configPath}/servarr/radarr:/config" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -104,6 +110,9 @@ in
|
|||||||
"--tmpfs=/tmp:rw,noexec,nosuid,size=512m"
|
"--tmpfs=/tmp:rw,noexec,nosuid,size=512m"
|
||||||
"--passwd-entry=root:x:0:0:root:/root:/bin/sh"
|
"--passwd-entry=root:x:0:0:root:/root:/bin/sh"
|
||||||
];
|
];
|
||||||
|
extraLabels = { } // (if serverCfg.containers ? authentik then {
|
||||||
|
"traefik.http.routers.${containerCfg.subdomain}-sonarr.middlewares" = "authentik";
|
||||||
|
} else {});
|
||||||
overrides.volumes = sharedVolumes ++ [ "${serverCfg.configPath}/servarr/sonarr:/config" ];
|
overrides.volumes = sharedVolumes ++ [ "${serverCfg.configPath}/servarr/sonarr:/config" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -126,6 +135,9 @@ in
|
|||||||
"--tmpfs=/tmp:rw,noexec,nosuid,size=512m"
|
"--tmpfs=/tmp:rw,noexec,nosuid,size=512m"
|
||||||
"--passwd-entry=root:x:0:0:root:/root:/bin/sh"
|
"--passwd-entry=root:x:0:0:root:/root:/bin/sh"
|
||||||
];
|
];
|
||||||
|
extraLabels = { } // (if serverCfg.containers ? authentik then {
|
||||||
|
"traefik.http.routers.${containerCfg.subdomain}-lidarr.middlewares" = "authentik";
|
||||||
|
} else {});
|
||||||
overrides.volumes = sharedVolumes ++ [ "${serverCfg.configPath}/servarr/lidarr:/config" ];
|
overrides.volumes = sharedVolumes ++ [ "${serverCfg.configPath}/servarr/lidarr:/config" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user