From f6002180f421fc6681b81d23a051d846bf846d1c Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Wed, 13 Apr 2022 13:50:16 -0700 Subject: transmission: use nginx for reverse proxy --- modules/services/transmission/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 ]; -- cgit 1.4.1