summaryrefslogtreecommitdiffstats
path: root/lib/types.nix
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
commit3ddb425e39fb698bb1fc226e8e6623c33a6f560d (patch)
tree6ab170f0db7399f779a4840226ac48421061d31b /lib/types.nix
parente250f858382a1c830a55a7243a80e1fbd2d1b15d (diff)
types net: fix retiolum's ipv6 prefix
Diffstat (limited to 'lib/types.nix')
-rw-r--r--lib/types.nix18
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/types.nix b/lib/types.nix
index d6d524377..c50969de7 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;