about summary refs log tree commit diff
path: root/modules/services/unifi
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services/unifi')
-rw-r--r--modules/services/unifi/default.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/services/unifi/default.nix b/modules/services/unifi/default.nix
index ee5ec6d..137e8ed 100644
--- a/modules/services/unifi/default.nix
+++ b/modules/services/unifi/default.nix
@@ -63,6 +63,20 @@ in {
       };
     };
 
+    services.nginx.virtualHosts."unifi.fcuny.xyz" = {
+      forceSSL = true;
+      useACMEHost = "unifi.fcuny.xyz";
+      locations."/" = {
+        proxyPass = "http://127.0.0.1:8443";
+        proxyWebsockets = true;
+      };
+    };
+
+    security.acme.certs."unifi.fcuny.xyz" = {
+      dnsProvider = "gcloud";
+      credentialsFile = secrets."acme/credentials".path;
+    };
+
     my.services.backup = { paths = [ "/var/lib/unifi" ]; };
   };
 }