diff --git a/nix/nixos-module/container/dhcp-server.nix b/nix/nixos-module/container/dhcp-server.nix index cc99507..7abaa50 100644 --- a/nix/nixos-module/container/dhcp-server.nix +++ b/nix/nixos-module/container/dhcp-server.nix @@ -30,7 +30,7 @@ in # ddns-conflict-resolution-mode = "check-exists-with-dhcid"; ddns-use-conflict-resolution = false; - subnet4 = concatMapDhcpNets (net: { vlan, subnet4, dhcp, domainName, ... }: { + subnet4 = concatMapDhcpNets (net: { vlan, subnet4, hosts4, dhcp, domainName, ... }: { id = vlan; subnet = subnet4; pools = [ { @@ -56,12 +56,7 @@ in data = "172.20.73.8, 9.9.9.9"; } ]; ddns-qualifying-suffix = domainName; - }); - - match-client-id = false; - host-reservation-identifiers = [ "hw-address" ]; - reservations = concatMapDhcpNets (net: { hosts4, dhcp, ... }: - lib.pipe dhcp.fixed-hosts [ + reservations = lib.pipe dhcp.fixed-hosts [ (builtins.mapAttrs (fixedAddr: hwaddr: if hosts4 ? ${fixedAddr} then # fixedAddr is a known hostname @@ -94,8 +89,11 @@ in )) builtins.attrValues (builtins.filter (r: r != null)) - ] - ); + ]; + }); + + match-client-id = false; + host-reservation-identifiers = [ "hw-address" ]; # Netbooting option-def = [ {