[Nix-dev] networking.wlanInterfaces issues

Tomas Hlavaty tom at logand.com
Sat May 27 21:28:14 CEST 2017


Hi,

I have issues with wifi configuration on 17.03.1203.58e227052d
(Gorilla):

1) specifying mac address doesn't work:

   building the system configuration...
   error: undefined variable ‘device’ at /nix/store/nm3nvlszbsg7c574airhra5gj2xwc9s8-nixexprs.tar.xz/nixos/modules/tasks/network-interfaces.nix:1120:89
   (use ‘--show-trace’ to show detailed location information)

   with config like this:

   networking.wlanInterfaces = {
     wlan1 = {
       device = "wlan0";
       mac = "12:34:56:78:90:12";
     };
   }

   Commenting out the mac line avoids the error but doesn't set the mac
   address.

2) What is wlanInterfaces supposed to do?  It does nothing as far as I
   can see.  In the example above, I would expect that "ip a" doesn't
   show wlan0 anymore but shows wlan1 instead.  Is my expectation
   correct?

3) How can I set a wireless interface to ad-hoc mode?  The device
   supports it, but wlanInterfaces does nothing again:

   $ iw list | grep -i ibss\\.
	   Device supports RSN-IBSS.
	   Device supports HT-IBSS.

   networking.wlanInterfaces = {
     wlan1 = {
       type = "ibss";
       device = "wlan0";
       mac = "12:34:56:78:90:12";
     };
   }

Thanks for ideas.

Tomas


More information about the nix-dev mailing list