dhcpcd service: want for both IP stacks

We want to wait for both stacks to be active before declaring that network is active.
So either both default gateways must be specified or only IPv4 if IPv6 is disabled to
avoid dhcpcd for network-online.target.

+1 -1
+1 -1
nixos/modules/services/networking/dhcpcd.nix
··· 156 156 systemd.services.dhcpcd = let 157 157 cfgN = config.networking; 158 158 hasDefaultGatewaySet = (cfgN.defaultGateway != null && cfgN.defaultGateway.address != "") 159 - || (cfgN.defaultGateway6 != null && cfgN.defaultGateway6.address != ""); 159 + && (!cfgN.enableIPv6 || (cfgN.defaultGateway6 != null && cfgN.defaultGateway6.address != "")); 160 160 in 161 161 { description = "DHCP Client"; 162 162