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

Invaluable for wiring up clouds.

Corbin d5c9a80c 052b9ec3

Changed files
+25
nixos
modules
services
network-filesystems
+25
nixos/modules/services/network-filesystems/tahoe.nix
···
The port on which the introducer will listen.
'';
};
+
tub.location = mkOption {
+
default = null;
+
type = types.nullOr types.str;
+
description = ''
+
The external location that the introducer should listen on.
+
+
If specified, the port should be included.
+
'';
+
};
package = mkOption {
default = pkgs.tahoelafs;
defaultText = "pkgs.tahoelafs";
···
system to listen on a different port.
'';
};
+
tub.location = mkOption {
+
default = null;
+
type = types.nullOr types.str;
+
description = ''
+
The external location that the node should listen on.
+
+
This is the setting to tweak if there are multiple interfaces
+
and you want to alter which interface Tahoe is advertising.
+
+
If specified, the port should be included.
+
'';
+
};
web.port = mkOption {
default = 3456;
type = types.int;
···
[node]
nickname = ${settings.nickname}
tub.port = ${toString settings.tub.port}
+
${optionalString (settings.tub.location != null)
+
"tub.location = ${settings.tub.location}"}
'';
});
# Actually require Tahoe, so that we will have it installed.
···
[node]
nickname = ${settings.nickname}
tub.port = ${toString settings.tub.port}
+
${optionalString (settings.tub.location != null)
+
"tub.location = ${settings.tub.location}"}
# This is a Twisted endpoint. Twisted Web doesn't work on
# non-TCP. ~ C.
web.port = tcp:${toString settings.web.port}