[Nix-dev] A few new options related to networking

Thomas Strobel ts468 at cam.ac.uk
Tue Oct 6 20:52:42 CEST 2015


Hi!

Recently, NixOS got a few new options for configuring the networking.
Here are a few examples to introduce the new options:

# Define several WLAN interfaces for one physical WLAN device.
networking.wlanInterfaces = {
  "wlan-station0" = {
    device = "wlp6s0";
  };
  "wlan-ap0" = {
    device = "wlp6s0";
  };
  "wlan-monitor0" = {
    type = "monitor";
    device = "wlp6s0";
  };
};

# Create an Open vSwitch.
networking.vswitches = {
  "vswitch0" = {
    interfaces = [ "wlan-station0" ];
  };
};

# Define and configure per-device supplicant services.
networking.supplicant = {
  "wlan-station0" = {
    configFile.path = "/etc/wpa_supplicant.conf";
    userControlled.enable = true;
    bridge = "vswitch0";
    extraConf = "p2p_disabled=1";
  };
};


Have a look at the modules for all new options and their descriptions.

Please be careful when using the new options. You're probably just
testing them :) Feedback is very welcome!


Cheers,
Thomas


More information about the nix-dev mailing list