Skip to content

wifi

Pre configure wifi networks to connect to

Uncategorized

This module allows you to pre-configure WiFi networks for automatic connection.
Each attribute in settings.network serves as an internal identifier, not the actual SSID.
After defining your networks, you will be prompted for the SSID and password for each one.

This module leverages NetworkManager for managing connections.

instances = {
    wifi = {
        module.name = "wifi";
        module.input = "clan-core";

        roles.default = {
            machines."jon" = {
                settings.networks.home = { };
                settings.networks.work = { keyMgmt = "wpa-eap"; };
            };
        };
    };
};

Roles

The wifi module has the following roles:

  • default

Options for the default role

networks

List of wifi networks to configure for connection. Each attribute name is an internal identifier (not the SSID). For each network, you will be prompted to enter the SSID and password as secrets.

Type: attribute set of (submodule)

Default:

{ }
Example
{
  guest = {
    autoConnect = false;
    keyMgmt = "wpa-eap";
  };
  home = { };
}

Declared in: clanServices/wifi/default.nix

networks.<name>.autoConnect

Automatically try to join this wifi network

Type: boolean

Default:

true

Declared in: clanServices/wifi/default.nix

networks.<name>.enable

Enable this wifi network

Type: boolean

Default:

true

Declared in: clanServices/wifi/default.nix

networks.<name>.keyMgmt

Key management used for the connection. One of "none" (WEP or no password protection), "ieee8021x" (Dynamic WEP), "owe" (Opportunistic Wireless Encryption), "wpa-psk" (WPA2 + WPA3 personal), "sae" (WPA3 personal only), "wpa-eap" (WPA2 + WPA3 enterprise) or "wpa-eap-suite-b-192" (WPA3 enterprise only).

Type: string

Default:

"wpa-psk"

Declared in: clanServices/wifi/default.nix