nixos-module/container/dhcp-server: don't set max-valid-lifetime but hold-reclaimed-time

hope that works without depleting the address pools
This commit is contained in:
Astro 2023-11-14 23:30:41 +01:00
parent dd3d650e46
commit dbc0e14f63
1 changed files with 4 additions and 1 deletions

View File

@ -29,6 +29,8 @@ in
# TODO: use with kea >= 2.5.0
# ddns-conflict-resolution-mode = "check-exists-with-dhcid";
ddns-use-conflict-resolution = false;
expired-leases-processing.hold-reclaimed-time = builtins.foldl' lib.max
3600 (concatMapDhcpNets (net: { dhcp, ... }: dhcp.max-time));
subnet4 = concatMapDhcpNets (net: { vlan, subnet4, hosts4, dhcp, domainName, ... }: {
id = vlan;
@ -36,8 +38,9 @@ in
pools = [ {
pool = "${dhcp.start} - ${dhcp.end}";
} ];
renew-timer = builtins.ceil (.5 * dhcp.time);
rebind-timer = builtins.ceil (.85 * dhcp.time);
valid-lifetime = dhcp.time;
max-valid-lifetime = dhcp.max-time;
option-data = [ {
space = "dhcp4";
name = "routers";