Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

wifi

Declarative Wi-Fi profile manager using NetworkManager. Supports three ways to supply passwords and has built-in eduroam (WPA-EAP) support.

Options

All options under atelier.network.wifi:

OptionTypeDefaultDescription
enableboolfalseEnable Wi-Fi management
hostNamestringSets networking.hostName
nameserverslist of strings[]Custom DNS servers
envFilepathEnvironment file providing PSK variables for all profiles

Profiles

Defined under atelier.network.wifi.profiles.<ssid>:

OptionTypeDefaultDescription
pskstring or nullnullLiteral WPA-PSK passphrase
pskVarstring or nullnullEnvironment variable name containing the PSK (from envFile)
pskFilepath or nullnullPath to file containing the PSK
eduroamboolfalseUse WPA-EAP with MSCHAPV2 (for eduroam networks)
identitystring or nullnullEAP identity (required when eduroam = true)

Only one of psk, pskVar, or pskFile should be set per profile.

Example

atelier.network.wifi = {
  enable = true;
  hostName = "moonlark";
  nameservers = [ "1.1.1.1" "8.8.8.8" ];
  envFile = config.age.secrets.wifi.path;

  profiles = {
    "Home Network" = {
      pskVar = "HOME_PSK";  # read from envFile
    };
    "eduroam" = {
      eduroam = true;
      identity = "user@university.edu";
      pskVar = "EDUROAM_PSK";
    };
    "Phone Hotspot" = {
      pskFile = config.age.secrets.hotspot.path;
    };
  };
};