about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-13 13:50:16 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-13 13:50:16 -0700
commitf6002180f421fc6681b81d23a051d846bf846d1c (patch)
tree4f4eb4de06afe9726af475c84b9126ed988e34d4 /modules
parentnavidrome: use nginx for reverse proxy (diff)
downloadworld-f6002180f421fc6681b81d23a051d846bf846d1c.tar.gz
transmission: use nginx for reverse proxy
Diffstat (limited to 'modules')
-rw-r--r--modules/services/transmission/default.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/services/transmission/default.nix b/modules/services/transmission/default.nix
index a1e14ab..ac0ded0 100644
--- a/modules/services/transmission/default.nix
+++ b/modules/services/transmission/default.nix
@@ -25,6 +25,20 @@ in {
       };
     };
 
+    services.nginx.virtualHosts."bt.fcuny.xyz" = {
+      forceSSL = true;
+      useACMEHost = "bt.fcuny.xyz";
+      locations."/" = {
+        proxyPass = "http://127.0.0.1:9091";
+        proxyWebsockets = true;
+      };
+    };
+
+    security.acme.certs."bt.fcuny.xyz" = {
+      dnsProvider = "gcloud";
+      credentialsFile = secrets."acme/credentials".path;
+    };
+
     networking.firewall = {
       allowedTCPPorts = [ 52213 ];
       allowedUDPPorts = [ 52213 ];