From dcae10ebdac761005c6ce3fc33ea6d958faa3bb0 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Wed, 2 Mar 2016 19:04:21 +0100 Subject: [PATCH] wpa_supplicant service: Depend on interfaces being present --- nixos/modules/services/networking/wpa_supplicant.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix index a8f445a2c73c..53648aef1e04 100644 --- a/nixos/modules/services/networking/wpa_supplicant.nix +++ b/nixos/modules/services/networking/wpa_supplicant.nix @@ -125,10 +125,12 @@ in { # FIXME: start a separate wpa_supplicant instance per interface. systemd.services.wpa_supplicant = let ifaces = cfg.interfaces; + deviceUnit = interface: [ "sys-subsystem-net-devices-${interface}.device" ]; in { description = "WPA Supplicant"; after = [ "network-interfaces.target" ]; + requires = lib.concatMap deviceUnit ifaces; wantedBy = [ "network.target" ]; path = [ pkgs.wpa_supplicant ];