types: use cidr only in tinc.subnets

This commit is contained in:
lassulus 2017-11-28 19:40:03 +01:00
parent d7b599e301
commit 5014ba291d
2 changed files with 12 additions and 3 deletions

View File

@ -449,8 +449,6 @@ with import <stockholm/lib>;
retiolum = rec { retiolum = rec {
via = internet; via = internet;
addrs = [ addrs = [
# edinburgh university
"129.215.0.0/16"
ip4.addr ip4.addr
ip6.addr ip6.addr
]; ];
@ -472,6 +470,10 @@ with import <stockholm/lib>;
lyK301Jb42wGEsVWxu3Eo/PLtp8OdD+Wdh6o/ELcc0k/YCUGFMujUM8CAwEAAQ== lyK301Jb42wGEsVWxu3Eo/PLtp8OdD+Wdh6o/ELcc0k/YCUGFMujUM8CAwEAAQ==
-----END RSA PUBLIC KEY----- -----END RSA PUBLIC KEY-----
''; '';
tinc.subnets = [
# edinburgh university
"129.215.0.0/16"
];
}; };
}; };
}; };

View File

@ -92,7 +92,7 @@ rec {
default = null; default = null;
}; };
addrs = mkOption { addrs = mkOption {
type = listOf cidr; type = listOf addr;
default = default =
optional (config.ip4 != null) config.ip4.addr ++ optional (config.ip4 != null) config.ip4.addr ++
optional (config.ip6 != null) config.ip6.addr; optional (config.ip6 != null) config.ip6.addr;
@ -155,6 +155,8 @@ rec {
++ ++
(map (a: "Subnet = ${a}") net.addrs) (map (a: "Subnet = ${a}") net.addrs)
++ ++
(map (a: "Subnet = ${a}") config.subnets)
++
[config.extraConfig] [config.extraConfig]
++ ++
[config.pubkey] [config.pubkey]
@ -173,6 +175,11 @@ rec {
description = "tinc port to use to connect to host"; description = "tinc port to use to connect to host";
default = 655; default = 655;
}; };
subnets = mkOption {
type = listOf cidr;
description = "tinc subnets";
default = [];
};
}; };
})); }));
default = null; default = null;