summaryrefslogtreecommitdiffstats
path: root/krebs/4lib/types.nix
diff options
context:
space:
mode:
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;