Wpa supplicant: Difference between revisions
imported>IgorM m Fixed syntax highlighting |
m Simple wpa2 auth example |
||
Line 45: | Line 45: | ||
To avoid having your network password in accessible plaintext on your system or in your version control consider using [https://search.nixos.org/options?show=networking.wireless.environmentFile&from=0&size=50&sort=relevance&type=packages&query=networking.wireless networking.wireless.environmentFile]. | To avoid having your network password in accessible plaintext on your system or in your version control consider using [https://search.nixos.org/options?show=networking.wireless.environmentFile&from=0&size=50&sort=relevance&type=packages&query=networking.wireless networking.wireless.environmentFile]. | ||
Another example of simple wpa2 auth: | |||
<syntaxhighlight lang="nix"> | |||
networking.networkmanager.enable = false; | |||
networking.wireless = { | |||
enable = true; # Enables wireless support via wpa_supplicant. | |||
networks."MYSSID".psk = "myPresharedKey"; | |||
extraConfig = "ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel"; | |||
# output ends up in /run/wpa_supplicant/wpa_supplicant.conf | |||
}; | |||
</syntaxhighlight> | |||
== Switching Network == | == Switching Network == |