From 0f486c46b2f746007e083b5122145c35c3bd38ed Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Sat, 14 Oct 2017 14:42:01 +0800 Subject: [PATCH] Revert "networkd: only wait for network to be online if configured to do so" This reverts commit 8f21e089a8de9eaa2512af25191d17077eca223a. --- nixos/modules/system/boot/networkd.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index 85e5aa478f19..9d2cea3ad165 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -8,8 +8,6 @@ let cfg = config.systemd.network; - waitOnline = config.networking.waitForOnline; - checkLink = checkUnitConfig "Link" [ (assertOnlyFields [ "Description" "Alias" "MACAddressPolicy" "MACAddress" "NamePolicy" "Name" @@ -701,9 +699,9 @@ in config = mkIf config.systemd.network.enable { systemd.additionalUpstreamSystemUnits = [ + "systemd-networkd.service" "systemd-networkd-wait-online.service" "org.freedesktop.network1.busname" - "systemd-networkd.service" - ] ++ optional waitOnline "systemd-networkd-wait-online.service"; + ]; systemd.network.units = mapAttrs' (n: v: nameValuePair "${n}.link" (linkToUnit n v)) cfg.links // mapAttrs' (n: v: nameValuePair "${n}.netdev" (netdevToUnit n v)) cfg.netdevs @@ -716,11 +714,11 @@ in restartTriggers = map (f: f.source) (unitFiles); }; - systemd.services.systemd-networkd-wait-online = lib.mkIf waitOnline { + systemd.services.systemd-networkd-wait-online = { wantedBy = [ "network-online.target" ]; }; - systemd.services."systemd-network-wait-online@" = lib.mkIf waitOnline { + systemd.services."systemd-network-wait-online@" = { description = "Wait for Network Interface %I to be Configured"; conflicts = [ "shutdown.target" ]; requisite = [ "systemd-networkd.service" ];