diff options
author | tv <tv@krebsco.de> | 2016-08-02 20:58:42 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-08-02 20:58:42 +0200 |
commit | e6aef09ad41cd55d716b8ee276ebd774b95d8ecb (patch) | |
tree | 6d8d5cce976f3843ab196367e82fec56f0798838 /krebs/4lib/types.nix | |
parent | 0928cc03a6191640c66c9122159994855527faef (diff) | |
parent | b197949ab83ee3ee87b5774e0fc7c8d0123a6708 (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'krebs/4lib/types.nix')
-rw-r--r-- | krebs/4lib/types.nix | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index 8906eff4a..37d44606b 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; |