retiolum: support nets.<net>.tinc.port
This commit is contained in:
parent
15944dc2c1
commit
8c465870fc
@ -132,8 +132,9 @@ let
|
||||
routeable IPv4 or IPv6 address.
|
||||
|
||||
In stockholm this can be done by configuring:
|
||||
krebs.hosts.${connect-host}.nets.${netname?"retiolum"}.via.addrs4 =
|
||||
[ "${external-ip} ${external-port}" ]
|
||||
krebs.hosts.${connect-host}.nets.${netname?"retiolum"}.via.ip4.addr =
|
||||
"${external-ip} ${external-port}"
|
||||
krebs.hosts.${connect-host}.nets.${netname?"retiolum"}.tinc.port = 1655;
|
||||
'';
|
||||
};
|
||||
|
||||
@ -176,6 +177,7 @@ let
|
||||
Interface = ${netname}
|
||||
${concatStrings (map (c: "ConnectTo = ${c}\n") cfg.connectTo)}
|
||||
PrivateKeyFile = ${cfg.privkey.path}
|
||||
Port = ${toString cfg.host.nets.${cfg.netname}.tinc.port}
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
"tinc-up" = pkgs.writeDash "${netname}-tinc-up" ''
|
||||
|
@ -130,7 +130,7 @@ types // rec {
|
||||
type = str;
|
||||
default = concatStringsSep "\n" (
|
||||
(optionals (net.via != null)
|
||||
(map (a: "Address = ${a}") net.via.addrs))
|
||||
(map (a: "Address = ${a} ${toString config.port}") net.via.addrs))
|
||||
++
|
||||
(map (a: "Subnet = ${a}") net.addrs)
|
||||
++
|
||||
@ -140,6 +140,11 @@ types // rec {
|
||||
pubkey = mkOption {
|
||||
type = tinc-pubkey;
|
||||
};
|
||||
port = mkOption {
|
||||
type = int;
|
||||
description = "tinc port to use to connect to host";
|
||||
default = 655;
|
||||
};
|
||||
};
|
||||
}));
|
||||
default = null;
|
||||
|
Loading…
Reference in New Issue
Block a user