From 7ec686981a372d25c684bd96c1fb29cc65a2f611 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Wed, 28 Aug 2019 13:40:41 -0400
Subject: [PATCH] Support configuring [node]tub.location

---
 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 00065052..65e6facc 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.location" = lib.mkOption
+    { default = "disabled";
+      type = lib.types.str;
+      example = lib.literalExample "tcp:192.0.2.0:8098";
+      description = ''
+        A value for the [node]tub.location in tahoe.cfg.
+      '';
+    };
   };
   config = lib.mkIf cfg.enable
   { services.tahoe.nodes."storage" =
@@ -42,6 +50,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.location" = cfg.tahoe.node."tub.location";
         };
         storage =
         { enabled = true;
-- 
GitLab