From d77984f571b11811240414d55b61390d9b90b6f1 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Mon, 19 Feb 2018 23:30:49 +0300 Subject: [PATCH] network-interfaces-scripted service: delay setup if IPv6 is disabled Even if IPv6 gateway is set, there's no need to set it early if IPv6 is disabled. --- nixos/modules/tasks/network-interfaces-scripted.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix index 63d07832d105..2687a64ff4c2 100644 --- a/nixos/modules/tasks/network-interfaces-scripted.nix +++ b/nixos/modules/tasks/network-interfaces-scripted.nix @@ -80,7 +80,7 @@ let else optional (dev != null && dev != "lo" && !config.boot.isContainer) (subsystemDevice dev); hasDefaultGatewaySet = (cfg.defaultGateway != null && cfg.defaultGateway.address != "") - || (cfg.defaultGateway6 != null && cfg.defaultGateway6.address != ""); + || (cfg.enableIPv6 && cfg.defaultGateway6 != null && cfg.defaultGateway6.address != ""); networkLocalCommands = { after = [ "network-setup.service" ];