at 17.09-beta 1.5 kB view raw
1<section xmlns="http://docbook.org/ns/docbook" 2 xmlns:xlink="http://www.w3.org/1999/xlink" 3 xmlns:xi="http://www.w3.org/2001/XInclude" 4 version="5.0" 5 xml:id="sec-wireless"> 6 7<title>Wireless Networks</title> 8 9<para>For a desktop installation using NetworkManager (e.g., GNOME), 10you just have to make sure the user is in the 11<code>networkmanager</code> group and you can skip the rest of this 12section on wireless networks.</para> 13 14<para> 15NixOS will start wpa_supplicant for you if you enable this setting: 16 17<programlisting> 18networking.wireless.enable = true; 19</programlisting> 20 21NixOS lets you specify networks for wpa_supplicant declaratively: 22<programlisting> 23networking.wireless.networks = { 24 echelon = { 25 psk = "abcdefgh"; 26 }; 27 "free.wifi" = {}; 28} 29</programlisting> 30 31Be aware that keys will be written to the nix store in plaintext! 32 33When no networks are set, it will default to using a configuration file at 34<literal>/etc/wpa_supplicant.conf</literal>. You should edit this file 35yourself to define wireless networks, WPA keys and so on (see 36wpa_supplicant.conf(5)). 37</para> 38 39<para> 40If you are using WPA2 the <command>wpa_passphrase</command> tool might be useful 41to generate the <literal>wpa_supplicant.conf</literal>. 42 43<screen> 44# wpa_passphrase ESSID PSK > /etc/wpa_supplicant.conf</screen> 45 46After you have edited the <literal>wpa_supplicant.conf</literal>, 47you need to restart the wpa_supplicant service. 48 49<screen> 50# systemctl restart wpa_supplicant.service</screen> 51</para> 52 53</section>