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 The port on which the introducer will listen. 27 ''; 28 }; 29 package = mkOption { 30 default = pkgs.tahoelafs; 31 defaultText = "pkgs.tahoelafs"; ··· 60 system to listen on a different port. 61 ''; 62 }; 63 web.port = mkOption { 64 default = 3456; 65 type = types.int; ··· 144 [node] 145 nickname = ${settings.nickname} 146 tub.port = ${toString settings.tub.port} 147 ''; 148 }); 149 # Actually require Tahoe, so that we will have it installed. ··· 209 [node] 210 nickname = ${settings.nickname} 211 tub.port = ${toString settings.tub.port} 212 # This is a Twisted endpoint. Twisted Web doesn't work on 213 # non-TCP. ~ C. 214 web.port = tcp:${toString settings.web.port}
··· 26 The port on which the introducer will listen. 27 ''; 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 + }; 38 package = mkOption { 39 default = pkgs.tahoelafs; 40 defaultText = "pkgs.tahoelafs"; ··· 69 system to listen on a different port. 70 ''; 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 + }; 84 web.port = mkOption { 85 default = 3456; 86 type = types.int; ··· 165 [node] 166 nickname = ${settings.nickname} 167 tub.port = ${toString settings.tub.port} 168 + ${optionalString (settings.tub.location != null) 169 + "tub.location = ${settings.tub.location}"} 170 ''; 171 }); 172 # Actually require Tahoe, so that we will have it installed. ··· 232 [node] 233 nickname = ${settings.nickname} 234 tub.port = ${toString settings.tub.port} 235 + ${optionalString (settings.tub.location != null) 236 + "tub.location = ${settings.tub.location}"} 237 # This is a Twisted endpoint. Twisted Web doesn't work on 238 # non-TCP. ~ C. 239 web.port = tcp:${toString settings.web.port}