diff --git a/machines/gerd/services/authelia/authelia-nginx.nix b/machines/gerd/services/authelia/authelia-nginx.nix index f927e4c..3b9f8c6 100644 --- a/machines/gerd/services/authelia/authelia-nginx.nix +++ b/machines/gerd/services/authelia/authelia-nginx.nix @@ -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};"; }; } diff --git a/machines/gerd/services/member-website/app.py b/machines/gerd/services/member-website/app.py index c234ef2..a8cdb4d 100755 --- a/machines/gerd/services/member-website/app.py +++ b/machines/gerd/services/member-website/app.py @@ -25,16 +25,17 @@ tmpl_index = """ {% for name, info in services.items() %}
Package name: {{ info.package.name }} Package version: {{ info.package.version }} Package homepage: {{ info.package.meta.homepage }} License: {{ info.package.meta.license.spdxId }} ({{ info.package.meta.license.shortName }}) Unfree: {{ info.package.meta.unfree }} - -+
{% endfor %} """ @@ -76,6 +77,7 @@ def extract_secrets() -> dict[str, str]: @app.route("/") +@app.route("/members") def index(): # extract user information user_info = { diff --git a/machines/gerd/services/member-website/default.nix b/machines/gerd/services/member-website/default.nix index bcaeeb4..ce6f214 100644 --- a/machines/gerd/services/member-website/default.nix +++ b/machines/gerd/services/member-website/default.nix @@ -20,7 +20,7 @@ in { services.nginx.virtualHosts."${config.mine.shared.settings.domain}" = config.mine.shared.lib.authelia.mkProtectedWebsite { endpoint = urlpath; vhostConfig.locations."${urlpath}" = { - extraConfig = "rewrite ^${urlpath}(.*)$ /$1 break;"; + # extraConfig = "rewrite ^${urlpath}(.*)$ /$1 break;"; proxyPass = "http://localhost:${builtins.toString port}"; }; };