From 16422d280959808aff1670a066788e98049f42b7 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 5 Apr 2023 14:04:11 +0200 Subject: introduce back static ipv4 prefix lenght but with default value --- nix/deuxfleurs.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'nix') diff --git a/nix/deuxfleurs.nix b/nix/deuxfleurs.nix index 57486c2..74a5734 100644 --- a/nix/deuxfleurs.nix +++ b/nix/deuxfleurs.nix @@ -37,6 +37,11 @@ in type = nullOr str; default = null; }; + staticIPv4.prefixLength = mkOption { + description = "IPv4 prefix length for LAN addresses, only used with static configuration"; + type = int; + default = 24; + }; staticIPv6.defaultGateway = mkOption { description = '' IPv6 address of the default route on the local network interface. @@ -161,7 +166,7 @@ in matchConfig.Name = "en* eth*"; address = - optional noDHCP "${cfg.staticIPv4.address}" + optional noDHCP "${cfg.staticIPv4.address}/${toString cfg.staticIPv4.prefixLength}" ++ optional noRA "${cfg.staticIPv6.address}/${toString cfg.staticIPv6.prefixLength}"; routes = -- cgit v1.2.3