summaryrefslogtreecommitdiff
path: root/hosts/cloud/proxy/auth.nix
diff options
context:
space:
mode:
authorGrigory Shipunov2025-01-14 21:24:05 +0000
committerGrigory Shipunov2025-01-19 19:21:43 +0000
commit5c3f0886e592ff2d3e3a8588ab496f36c19e0ce9 (patch)
tree53593dfbed713fe889cd533c1bd38506c1a09bfa /hosts/cloud/proxy/auth.nix
parent2f2318aaaa6745cdf3a58142b988b2550bf6b952 (diff)
yeet authentik, add keycloak and radicale
Diffstat (limited to 'hosts/cloud/proxy/auth.nix')
-rw-r--r--hosts/cloud/proxy/auth.nix24
1 files changed, 24 insertions, 0 deletions
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;
+ '';
+ };
+ };
+}