introduce back static ipv4 prefix lenght but with default value
This commit is contained in:
parent
bb25797d2f
commit
16422d2809
4 changed files with 9 additions and 4 deletions
|
@ -10,7 +10,7 @@
|
|||
boot.loader.timeout = 20;
|
||||
|
||||
deuxfleurs.hostName = "df-pw5";
|
||||
deuxfleurs.staticIPv4.address = "192.168.5.130/24";
|
||||
deuxfleurs.staticIPv4.address = "192.168.5.130";
|
||||
deuxfleurs.staticIPv6.address = "2a02:a03f:6510:5102:223:24ff:feb0:e8a7";
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
deuxfleurs.hostName = "origan";
|
||||
deuxfleurs.staticIPv4.address = "192.168.1.33/24";
|
||||
deuxfleurs.staticIPv4.address = "192.168.1.33";
|
||||
deuxfleurs.staticIPv6.address = "2a01:e0a:5e4:1d0:223:24ff:feaf:fdec";
|
||||
deuxfleurs.isRaftServer = true;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
deuxfleurs.hostName = "piranha";
|
||||
deuxfleurs.staticIPv4.address = "192.168.1.25/24";
|
||||
deuxfleurs.staticIPv4.address = "192.168.1.25";
|
||||
deuxfleurs.staticIPv6.address = "2a01:cb05:9142:7400:223:24ff:feb0:ea82";
|
||||
deuxfleurs.isRaftServer = true;
|
||||
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue