summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-04-08 04:41:30 +0200
committertv <tv@krebsco.de>2016-04-08 04:41:30 +0200
commite74f4ddf8182067ca4f44d8d4ed91a8c5fc65147 (patch)
treeac20cfe3dc5b8bbff8fae15f9a40ef1d7e64f570
parent4e99bb9d12405cf1910af3205d8668604e516f50 (diff)
krebs types.addr6: str -> IPv6 address*
-rw-r--r--krebs/3modules/makefu/default.nix2
-rw-r--r--krebs/4lib/types.nix9
2 files changed, 9 insertions, 2 deletions
diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix
index b93b34d24..814e6929b 100644
--- a/krebs/3modules/makefu/default.nix
+++ b/krebs/3modules/makefu/default.nix
@@ -548,7 +548,7 @@ TNs2RYfwDy/r6H/hDeB/BSngPouedEVcPwIDAQAB
nets = {
retiolum = {
ip4.addr = "10.243.0.163";
- ip6.addr = "42:b67b:5752:a730:5f28:d80d:6b37:5bda/128";
+ ip6.addr = "42:b67b:5752:a730:5f28:d80d:6b37:5bda";
aliases = [
"senderechner.r"
];
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix
index 6396927dd..f46491801 100644
--- a/krebs/4lib/types.nix
+++ b/krebs/4lib/types.nix
@@ -223,7 +223,14 @@ types // rec {
in x: match IPv4address x != null;
merge = mergeOneOption;
};
- addr6 = str; # TODO
+ addr6 = mkOptionType {
+ name = "IPv6 address";
+ check = let
+ # TODO check IPv6 address harder
+ IPv6address = "[0-9a-f.:]+";
+ in x: match IPv6address x != null;
+ merge = mergeOneOption;
+ };
pgp-pubkey = str;