about summary refs log tree commit diff
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2017-02-23 16:01:36 +0100
committerFranz Pletz <fpletz@fnordicwalking.de>2017-02-23 16:07:40 +0100
commit66f553974b74378c524f08b3c7d745907927e6c4 (patch)
treeb4cc29efadf48aa2dd3dc6900f0a5e859eaf57fb /nixos/modules/system
parent0cfa40d1229d20af816e299d77d09819934231e9 (diff)
dhcpcd service: fix network-online.target integration
When dhcpcd instead of networkd is used, the network-online.target behaved
the same as network.target, resulting in broken services that need a working
network connectivity when being started.

This commit makes dhcpcd wait for a lease and makes it wanted by
network-online.target. In turn, network-online.target is now wanted by
multi-user.target, so it will be activated at every boot.
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/boot/systemd.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index de5fb3edd67e1..bff6739db6162 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -842,6 +842,7 @@ in
     systemd.services.systemd-journald.stopIfChanged = false;
     systemd.targets.local-fs.unitConfig.X-StopOnReconfiguration = true;
     systemd.targets.remote-fs.unitConfig.X-StopOnReconfiguration = true;
+    systemd.targets.network-online.wantedBy = [ "multi-user.target" ];
     systemd.services.systemd-binfmt.wants = [ "proc-sys-fs-binfmt_misc.automount" ];
 
     # Don't bother with certain units in containers.