Wireless Networks
 
  For a desktop installation using NetworkManager (e.g., GNOME), you just have
  to make sure the user is in the networkmanager group and you can
  skip the rest of this section on wireless networks.
 
 
  NixOS will start wpa_supplicant for you if you enable this setting:
 = true;
  NixOS lets you specify networks for wpa_supplicant declaratively:
 = {
  echelon = {
    psk = "abcdefgh";
  };
  "free.wifi" = {};
}
  Be aware that keys will be written to the nix store in plaintext! When no
  networks are set, it will default to using a configuration file at
  /etc/wpa_supplicant.conf. You should edit this file
  yourself to define wireless networks, WPA keys and so on (see
  wpa_supplicant.conf(5)).
 
 
  If you are using WPA2 the wpa_passphrase tool might be
  useful to generate the wpa_supplicant.conf.
# wpa_passphrase ESSID PSK > /etc/wpa_supplicant.conf
  After you have edited the wpa_supplicant.conf, you need to
  restart the wpa_supplicant service.
# systemctl restart wpa_supplicant.service