summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2020-01-12 13:28:50 +0100
committerLinus Heckemann <git@sphalerite.org>2020-01-12 14:14:16 +0100
commitbbd6d219e4be16f9746ba587c4c0a37ee354c57b (patch)
treef5d63bfb3d3a130fec12cd2fb5f86919c941d4cd /nixos/modules
parente1eedf29e5d22e6824e614d75449b75a2e3455d6 (diff)
downloadnixpkgs-bbd6d219e4be16f9746ba587c4c0a37ee354c57b.tar
nixpkgs-bbd6d219e4be16f9746ba587c4c0a37ee354c57b.tar.gz
nixpkgs-bbd6d219e4be16f9746ba587c4c0a37ee354c57b.tar.bz2
nixpkgs-bbd6d219e4be16f9746ba587c4c0a37ee354c57b.tar.lz
nixpkgs-bbd6d219e4be16f9746ba587c4c0a37ee354c57b.tar.xz
nixpkgs-bbd6d219e4be16f9746ba587c4c0a37ee354c57b.tar.zst
nixpkgs-bbd6d219e4be16f9746ba587c4c0a37ee354c57b.zip
nixos/wpa_supplicant: fix #61391
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/networking/wpa_supplicant.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix
index 8f05c3949fb..de0f11595a9 100644
--- a/nixos/modules/services/networking/wpa_supplicant.nix
+++ b/nixos/modules/services/networking/wpa_supplicant.nix
@@ -233,6 +233,7 @@ in {
       path = [ pkgs.wpa_supplicant ];
 
       script = ''
+        iface_args="-s -u -D${cfg.driver} -c ${configFile}"
         ${if ifaces == [] then ''
           for i in $(cd /sys/class/net && echo *); do
             DEVTYPE=
@@ -240,14 +241,14 @@ in {
             if [ -e "$UEVENT_PATH" ]; then
               source "$UEVENT_PATH"
               if [ "$DEVTYPE" = "wlan" -o -e /sys/class/net/$i/wireless ]; then
-                ifaces="$ifaces''${ifaces:+ -N} -i$i"
+                args+="''${args:+ -N} -i$i $iface_args"
               fi
             fi
           done
         '' else ''
-          ifaces="${concatStringsSep " -N " (map (i: "-i${i}") ifaces)}"
+          args="${concatMapStringsSep " -N " (i: "-i${i} $iface_args") ifaces}"
         ''}
-        exec wpa_supplicant -s -u -D${cfg.driver} -c ${configFile} $ifaces
+        exec wpa_supplicant $args
       '';
     };