I've recently stopped using NetworkManger to manage my network and VPN connections as it seems to be a bit fiddly to get working with WireGuard.
Make sure all NetworkManager things have been removed.
systemd-resolvconf if you intend to use WireGuards
sudo pacman -S systemd-resolvconf
sudo systemctl enable systemd-resolved sudo systemctl enable systemd-networkd
Next remove the file (or symlink) at
/etc/resolv.conf and replace it with a
new link to the
sudo rm -f /etc/resolv.conf # or move it... # sudo mv /etc/resolv.conf /etc/resolv.conf.bak sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
For pihole users it may be useful to disable any fallback DNS settings. Do this
by creating a file
sudo mkdir -p /etc/systemd/resolved.conf.d sudo vim /etc/systemd/resolved.conf.d/fallback_dns.conf
With this content:
I disable Predictable Network Interface Names
because I find it annoying to not know what my devices are called. These
adapters don't change often (if ever) and I'd like the names to be the OG
wlan0 name. To do this, add
net.ifnames=0 to the kernel options in
Create a file in
/etc/systemd/network/20-wired.network with the contents:
[Match] Name=eth0 [Network] DHCP=yes
iwd package and create a file in
/etc/iwd/main.conf with the content:
[General] EnableNetworkConfiguration=true [Network] NameResolvingService=systemd
Enable/start the service with
sudo systemctl enable --now iwd.service.
This service messes about a little bit with devices so a reboot may be necessary here.
Finally configure the WiFi adapter with