Using linuxPackages_3_3, nixos/modules/services/networking/wpa_supplicant.nix’s generated upstart script fails to autodetect the wireless interfaces, since there is no wireless file in the expected sysfs place, leading to a wpa_supplicant command line that does nothing. (But executes without any errors, surprisingly.)

    script =
        ${if ifaces == [] then ''
          for i in $(cd /sys/class/net && echo *); do
            if [ -e /sys/class/net/$i/wireless ]; then   # <----- here
              ifaces="$ifaces''${ifaces:+ -N} -i$i"
        '' else ''
          ifaces="${concatStringsSep " -N " (map (i: "-i${i}") ifaces)}"
        exec wpa_supplicant -s -u -c ${configFile} $ifaces

Some more info,

$ uname -vr
3.3.0-rc7 #1 SMP Mon Mar 12 11:14:41 UTC 2012
$ ls  /sys/class/net/wlan0/
addr_assign_type  broadcast  dev_id   flags    iflink     netdev_group  power   statistics    type
address           carrier    dormant  ifalias  link_mode  operstate     queues  subsystem     uevent
addr_len          device     duplex   ifindex  mtu        phy80211      speed   tx_queue_len
$ lspci -v | grep Network
02:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
03:08.0 Ethernet controller: Intel Corporation PRO/100 VE Network Connection (rev 02)

I also have

hardware.firmware = [ pkgs.iwlwifi3945ucode ];

set in configuration.nix since I thought I had to.
I suspect the phy80211 could be used instead of wireless, but I am not at all sure. A quick and easy workaround is to be explicit, i.e. set

networking.wireless.interfaces = [ "wlan0" ];

in configuration.nix.

Submitted on 14 March 2012 at 19:38

Log in to post comments