summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2021-11-21 13:47:53 +0100
committertv <tv@krebsco.de>2021-11-21 13:47:53 +0100
commitf4078fd4f668417fe64579767e61f70b2099ad57 (patch)
treef751069d479284046fe3a2b71daec8a7f8e37f17 /lib
parent66b1e698d7e1341f0c8d8bdb1e6be945352e7c88 (diff)
types net: fix retiolum's ipv6 prefix
Diffstat (limited to 'lib')
-rw-r--r--lib/types.nix18
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/types.nix b/lib/types.nix
index d6d5243..c50969d 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -135,11 +135,10 @@ rec {
};
prefix = mkOption ({
type = cidr4;
- } // optionalAttrs (config._module.args.name == "retiolum") {
- default = "10.243.0.0/16";
- } // optionalAttrs (config._module.args.name == "wiregrill") {
- default = "10.244.0.0/16";
- });
+ } // {
+ retiolum.default = "10.243.0.0/16";
+ wiregrill.default = "10.244.0.0/16";
+ }.${config._module.args.name} or {});
};
});
default = null;
@@ -153,11 +152,10 @@ rec {
};
prefix = mkOption ({
type = cidr6;
- } // optionalAttrs (config._module.args.name == "retiolum") {
- default = "42::/16";
- } // optionalAttrs (config._module.args.name == "wiregrill") {
- default = "42:1::/32";
- });
+ } // {
+ retiolum.default = "42:0::/32";
+ wiregrill.default = "42:1::/32";
+ }.${config._module.args.name} or {});
};
});
default = null;