fix auth midleware

This commit is contained in:
soraefir
2026-05-21 02:28:42 +02:00
parent 37143eff2d
commit 7cc516a0be
2 changed files with 17 additions and 1 deletions

View File

@@ -2,6 +2,10 @@
let
serverCfg = config.syscfg.server;
version = "latest";
routerName = if containerCfg.subpath != null
then "${containerCfg.subdomain}-${lib.strings.sanitizeDerivationName containerCfg.subpath}"
else containerCfg.subdomain;
in {
paths = [{
@@ -27,7 +31,7 @@ in {
AUTOMATED_CONVERSION_OUTPUT_SUBDIR = "SAME_AS_SRC";
};
extraLabels = { } // (if serverCfg.containers ? authentik then {
"traefik.http.routers.${containerCfg.subdomain}.middlewares" = "authentik";
"traefik.http.routers.${routerName}.middlewares" = "authentik";
} else {});
extraOptions = [
"--tmpfs=/tmp:rw,noexec,nosuid,size=512m"