summary refs log tree commit diff
path: root/nixos/modules/system/boot/networkd.nix
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2017-10-14 14:42:01 +0800
committerPeter Hoeg <peter@hoeg.com>2017-10-14 14:42:49 +0800
commit0f486c46b2f746007e083b5122145c35c3bd38ed (patch)
tree351d4b50d9e55f00a32ed4b6a4ede2e1599626eb /nixos/modules/system/boot/networkd.nix
parent2cd4ebfe93c2ceb5d01073d5b4372b80687c7527 (diff)
downloadnixlib-0f486c46b2f746007e083b5122145c35c3bd38ed.tar
nixlib-0f486c46b2f746007e083b5122145c35c3bd38ed.tar.gz
nixlib-0f486c46b2f746007e083b5122145c35c3bd38ed.tar.bz2
nixlib-0f486c46b2f746007e083b5122145c35c3bd38ed.tar.lz
nixlib-0f486c46b2f746007e083b5122145c35c3bd38ed.tar.xz
nixlib-0f486c46b2f746007e083b5122145c35c3bd38ed.tar.zst
nixlib-0f486c46b2f746007e083b5122145c35c3bd38ed.zip
Revert "networkd: only wait for network to be online if configured to do so"
This reverts commit 8f21e089a8de9eaa2512af25191d17077eca223a.
Diffstat (limited to 'nixos/modules/system/boot/networkd.nix')
-rw-r--r--nixos/modules/system/boot/networkd.nix10
1 files 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" ];