gerd.authelia: added new shared function for protectedLocation

This commit is contained in:
eyjhb 2024-08-14 21:28:39 +02:00
parent 0c47c0cbe6
commit ee11537669
No known key found for this signature in database
GPG key ID: 609F508E3239F920

View file

@ -78,6 +78,10 @@ let
in { in {
mine.shared.lib.authelia.mkProtectedWebsite = { vhostConfig, endpoint ? "/" }: lib.recursiveUpdate vhostConfig { mine.shared.lib.authelia.mkProtectedWebsite = { vhostConfig, endpoint ? "/" }: lib.recursiveUpdate vhostConfig {
extraConfig = (lib.attrByPath [ "extraConfig" ] "" vhostConfig) + "\n" + "include ${autheliaLocation};"; extraConfig = (lib.attrByPath [ "extraConfig" ] "" vhostConfig) + "\n" + "include ${autheliaLocation};";
locations."${endpoint}".extraConfig = (lib.attrByPath [ "locations" endpoint "extraConfig" ] "" vhostConfig) + "\n" + "include ${autheliaRequest};"; locations."${endpoint}" = config.mine.shared.lib.authelia.mkProtectedLocation (lib.attrByPath [ "locations" endpoint ] {} vhostConfig);
};
mine.shared.lib.authelia.mkProtectedLocation = vhostLocationConfig: lib.recursiveUpdate vhostLocationConfig {
extraConfig = (lib.attrByPath [ "extraConfig" ] "" vhostLocationConfig) + "\n" + "include ${autheliaRequest};";
}; };
} }