From 5c3f0886e592ff2d3e3a8588ab496f36c19e0ce9 Mon Sep 17 00:00:00 2001 From: Grigory Shipunov Date: Tue, 14 Jan 2025 21:24:05 +0000 Subject: yeet authentik, add keycloak and radicale --- hosts/cloud/proxy/auth.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 hosts/cloud/proxy/auth.nix (limited to 'hosts/cloud/proxy/auth.nix') diff --git a/hosts/cloud/proxy/auth.nix b/hosts/cloud/proxy/auth.nix new file mode 100644 index 0000000..27ee2ee --- /dev/null +++ b/hosts/cloud/proxy/auth.nix @@ -0,0 +1,24 @@ +{ ... }: +{ + services.nginx.upstreams.keycloak = { + servers = { + "10.89.88.11:38080" = {}; + "[fd31:185d:722f::11]:38080" = {}; + }; + }; + + services.nginx.virtualHosts."auth.oxapentane.com" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://keycloak"; + extraConfig = '' + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Port 433; + ''; + }; + }; +} -- cgit v1.3.1