services/tahoe: Add tub.location for specifying external IPs.

Invaluable for wiring up clouds.

Corbin d5c9a80c 052b9ec3

+25
+25
nixos/modules/services/network-filesystems/tahoe.nix
··· 26 26 The port on which the introducer will listen. 27 27 ''; 28 28 }; 29 + tub.location = mkOption { 30 + default = null; 31 + type = types.nullOr types.str; 32 + description = '' 33 + The external location that the introducer should listen on. 34 + 35 + If specified, the port should be included. 36 + ''; 37 + }; 29 38 package = mkOption { 30 39 default = pkgs.tahoelafs; 31 40 defaultText = "pkgs.tahoelafs"; ··· 60 69 system to listen on a different port. 61 70 ''; 62 71 }; 72 + tub.location = mkOption { 73 + default = null; 74 + type = types.nullOr types.str; 75 + description = '' 76 + The external location that the node should listen on. 77 + 78 + This is the setting to tweak if there are multiple interfaces 79 + and you want to alter which interface Tahoe is advertising. 80 + 81 + If specified, the port should be included. 82 + ''; 83 + }; 63 84 web.port = mkOption { 64 85 default = 3456; 65 86 type = types.int; ··· 144 165 [node] 145 166 nickname = ${settings.nickname} 146 167 tub.port = ${toString settings.tub.port} 168 + ${optionalString (settings.tub.location != null) 169 + "tub.location = ${settings.tub.location}"} 147 170 ''; 148 171 }); 149 172 # Actually require Tahoe, so that we will have it installed. ··· 209 232 [node] 210 233 nickname = ${settings.nickname} 211 234 tub.port = ${toString settings.tub.port} 235 + ${optionalString (settings.tub.location != null) 236 + "tub.location = ${settings.tub.location}"} 212 237 # This is a Twisted endpoint. Twisted Web doesn't work on 213 238 # non-TCP. ~ C. 214 239 web.port = tcp:${toString settings.web.port}