aboutsummaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-04-05 14:04:11 +0200
committerAlex Auvolat <alex@adnab.me>2023-04-05 14:04:11 +0200
commit16422d280959808aff1670a066788e98049f42b7 (patch)
tree695288d468b57b442f59bc9bf9da3e7276ff4c98 /nix
parentbb25797d2f164f3f0f3c81a492e8f6e7fe1fd232 (diff)
downloadnixcfg-16422d280959808aff1670a066788e98049f42b7.tar.gz
nixcfg-16422d280959808aff1670a066788e98049f42b7.zip
introduce back static ipv4 prefix lenght but with default value
Diffstat (limited to 'nix')
-rw-r--r--nix/deuxfleurs.nix7
1 files changed, 6 insertions, 1 deletions
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 =