WiFi

I use iwd to manage the wireless interfaces, which is very easy to use. It is enabled via systemctl enable iwd.

Connecting to a network

iwctl station wlan0 connect <network-ssid>

DHCP setup

I use dhcpcd as a DHCP client, which means iwd’s internal client has to be disabled. This is because I tried using iwd's internal client but was repeatedly having issues with it failing to obtain addresses (see below).

[General]
EnableNetworkConfiguration=false

I disable writing to /etc/resolv.conf in the dhcpcd configuration because that wreaks havoc with my mullvad setup (it interferes with systemd-resolved). I do that by adding:

nohook resolv.conf

To the bottom of /etc/dhcpcd.conf.

Problems with the IWD internal DHCP client

Problems with systemd-resolved, dhcpcd, and mullvad

DNS setup

I use systemd-resolved to manage DNS servers. This requires iwd to know about the resolver, as well as some symlinks.

  1. systemd-resolved must be enabled as a service (systemctl enable systemd-resolved)

  2. iwd must be configured to use it:

    [Network]
    NameResolvingService=systemd
    
  3. You must symlink resolvconf configuration appropriately: sudo ln -nsf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

  4. If necessary, (re)start the services in order (systemd-resolved and iwd)

Previous setup