From 5ff25fcd7ebc18fe3a0f73fd95831fb267b06734 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sun, 18 Feb 2018 23:42:03 +0300 Subject: [PATCH] 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. --- nixos/modules/services/networking/dhcpcd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix index f0f8f1324c5..e2127518f1a 100644 --- a/nixos/modules/services/networking/dhcpcd.nix +++ b/nixos/modules/services/networking/dhcpcd.nix @@ -156,7 +156,7 @@ in systemd.services.dhcpcd = let cfgN = config.networking; hasDefaultGatewaySet = (cfgN.defaultGateway != null && cfgN.defaultGateway.address != "") - || (cfgN.defaultGateway6 != null && cfgN.defaultGateway6.address != ""); + && (!cfgN.enableIPv6 || (cfgN.defaultGateway6 != null && cfgN.defaultGateway6.address != "")); in { description = "DHCP Client";