at 18.09-beta 1.6 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 <title>Wireless Networks</title> 7 8 <para> 9 For a desktop installation using NetworkManager (e.g., GNOME), you just have 10 to make sure the user is in the <code>networkmanager</code> group and you can 11 skip the rest of this section on wireless networks. 12 </para> 13 14 <para> 15 NixOS will start wpa_supplicant for you if you enable this setting: 16<programlisting> 17<xref linkend="opt-networking.wireless.enable"/> = true; 18</programlisting> 19 NixOS lets you specify networks for wpa_supplicant declaratively: 20<programlisting> 21<xref linkend="opt-networking.wireless.networks"/> = { 22 echelon = { 23 psk = "abcdefgh"; 24 }; 25 "free.wifi" = {}; 26} 27</programlisting> 28 Be aware that keys will be written to the nix store in plaintext! When no 29 networks are set, it will default to using a configuration file at 30 <literal>/etc/wpa_supplicant.conf</literal>. You should edit this file 31 yourself to define wireless networks, WPA keys and so on (see 32 wpa_supplicant.conf(5)). 33 </para> 34 35 <para> 36 If you are using WPA2 the <command>wpa_passphrase</command> tool might be 37 useful to generate the <literal>wpa_supplicant.conf</literal>. 38<screen> 39# wpa_passphrase ESSID PSK > /etc/wpa_supplicant.conf</screen> 40 After you have edited the <literal>wpa_supplicant.conf</literal>, you need to 41 restart the wpa_supplicant service. 42<screen> 43# systemctl restart wpa_supplicant.service</screen> 44 </para> 45</section>