summaryrefslogtreecommitdiffstats
path: root/krebs/4lib/types.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-08-02 20:58:42 +0200
committertv <tv@krebsco.de>2016-08-02 20:58:42 +0200
commite6aef09ad41cd55d716b8ee276ebd774b95d8ecb (patch)
tree6d8d5cce976f3843ab196367e82fec56f0798838 /krebs/4lib/types.nix
parent0928cc03a6191640c66c9122159994855527faef (diff)
parentb197949ab83ee3ee87b5774e0fc7c8d0123a6708 (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'krebs/4lib/types.nix')
-rw-r--r--krebs/4lib/types.nix14
1 files changed, 13 insertions, 1 deletions
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix
index 8906eff4..37d44606 100644
--- a/krebs/4lib/types.nix
+++ b/krebs/4lib/types.nix
@@ -130,16 +130,28 @@ 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)
++
+ [config.extraConfig]
+ ++
[config.pubkey]
);
};
pubkey = mkOption {
type = tinc-pubkey;
};
+ extraConfig = mkOption {
+ description = "Extra Configuration to be appended to the hosts file";
+ default = "";
+ type = string;
+ };
+ port = mkOption {
+ type = int;
+ description = "tinc port to use to connect to host";
+ default = 655;
+ };
};
}));
default = null;