From c262684eb40c97100d5929b5c1f1402fbc81194d Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Wed, 28 Aug 2019 14:20:28 -0400
Subject: [PATCH] Support configuring [node]tub.port

---
 nixos/modules/private-storage.nix | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/nixos/modules/private-storage.nix b/nixos/modules/private-storage.nix
index 65e6facc..ae0eb077 100644
--- a/nixos/modules/private-storage.nix
+++ b/nixos/modules/private-storage.nix
@@ -33,6 +33,14 @@ in
         The package to use for the Tahoe-LAFS daemon.
       '';
     };
+    services.private-storage.tahoe.node."tub.port" = lib.mkOption
+    { default = "disabled";
+      type = lib.types.str;
+      example = lib.literalExample "tcp:8098";
+      description = ''
+        A value for the [node]tub.port in tahoe.cfg.
+      '';
+    };
     services.private-storage.tahoe.node."tub.location" = lib.mkOption
     { default = "disabled";
       type = lib.types.str;
@@ -50,6 +58,7 @@ in
         # XXX Should try to name that is unique across the grid.
         { nickname = "storage";
           "web.port" = "tcp:3456:interface=127.0.0.1";
+          "tub.port" = cfg.tahoe.node."tub.port";
           "tub.location" = cfg.tahoe.node."tub.location";
         };
         storage =
-- 
GitLab