updated member app and authelia nginx

This commit is contained in:
eyjhb 2024-08-13 14:41:47 +02:00
parent 23faf44b39
commit 74ff08576a
Signed by: eyjhb
GPG key ID: 609F508E3239F920
3 changed files with 9 additions and 21 deletions

View file

@ -76,22 +76,8 @@ let
error_page 401 =302 https://auth.fricloud.dk/?rd=$target_url;
'';
in {
mine.shared.lib.authelia.mkProtectedWebsite = { vhostConfig, endpoint ? "/" }: lib.recursiveUpdate {
forceSSL = true;
enableACME = true;
extraConfig = "include ${autheliaLocation};";
locations."${endpoint}" = {
extraConfig = "include ${autheliaRequest};";
};
} vhostConfig;
services.nginx.virtualHosts."test.fricloud.dk" = config.mine.shared.lib.authelia.mkProtectedWebsite {
vhostConfig = {
locations."/".root = pkgs.writeTextDir "index.html" ''
ACCESS GRANTED!
'';
};
mine.shared.lib.authelia.mkProtectedWebsite = { vhostConfig, endpoint ? "/" }: lib.recursiveUpdate vhostConfig {
extraConfig = (lib.attrByPath [ "extraConfig" ] "" vhostConfig) + "\n" + "include ${autheliaLocation};";
locations."${endpoint}".extraConfig = (lib.attrByPath [ "locations" endpoint "extraConfig" ] "" vhostConfig) + "\n" + "include ${autheliaRequest};";
};
}