summaryrefslogtreecommitdiffstats
path: root/lib/types.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-11-28 19:40:03 +0100
committerlassulus <lassulus@lassul.us>2017-11-29 15:51:13 +0100
commit5014ba291dce70a8b4ffb36ddc0d9cd3a45aa6e4 (patch)
tree0653bb8c85307b34a54c8ac003e03016c91944a6 /lib/types.nix
parentd7b599e301b04d35f493445acd94fd62ce061793 (diff)
types: use cidr only in tinc.subnets
Diffstat (limited to 'lib/types.nix')
-rw-r--r--lib/types.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/types.nix b/lib/types.nix
index 08dc0974e..c3b14d807 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -92,7 +92,7 @@ rec {
default = null;
};
addrs = mkOption {
- type = listOf cidr;
+ type = listOf addr;
default =
optional (config.ip4 != null) config.ip4.addr ++
optional (config.ip6 != null) config.ip6.addr;
@@ -155,6 +155,8 @@ rec {
++
(map (a: "Subnet = ${a}") net.addrs)
++
+ (map (a: "Subnet = ${a}") config.subnets)
+ ++
[config.extraConfig]
++
[config.pubkey]
@@ -173,6 +175,11 @@ rec {
description = "tinc port to use to connect to host";
default = 655;
};
+ subnets = mkOption {
+ type = listOf cidr;
+ description = "tinc subnets";
+ default = [];
+ };
};
}));
default = null;