about summary refs log tree commit diff
path: root/modules/services/transmission
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services/transmission')
-rw-r--r--modules/services/transmission/default.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/services/transmission/default.nix b/modules/services/transmission/default.nix
index dea7828..57bea77 100644
--- a/modules/services/transmission/default.nix
+++ b/modules/services/transmission/default.nix
@@ -5,6 +5,11 @@ let
 in {
   options.my.services.transmission = with lib; {
     enable = mkEnableOption "transmission torrent server";
+    vhostName = mkOption {
+      type = types.str;
+      example = "music.fcuny.net";
+      description = "Name for the virtual host";
+    };
   };
 
   config = lib.mkIf cfg.enable {
@@ -27,16 +32,16 @@ in {
       };
     };
 
-    services.nginx.virtualHosts."bt.fcuny.xyz" = {
+    services.nginx.virtualHosts."${cfg.vhostName}" = {
       forceSSL = true;
-      useACMEHost = "bt.fcuny.xyz";
+      useACMEHost = cfg.vhostName;
       locations."/" = {
         proxyPass = "http://127.0.0.1:9091";
         proxyWebsockets = true;
       };
     };
 
-    security.acme.certs."bt.fcuny.xyz" = {
+    security.acme.certs."${cfg.vhostName}" = {
       dnsProvider = "gcloud";
       credentialsFile = secrets."acme/credentials".path;
     };