+
The default networking stack on NixOS uses NetworkManager. @@ -19,9 +31,17 @@ If you're configuring a server, you probably don't need iwd at all; systemd-networkd and systemd-resolved are usually sufficient.
- +Table of Contents
+-
+
- The default stack +
- iwd +
- systemd-networkd +
- systemd-resolved +
- P.S. Captive portals +
- P.P.S. I miss nm-applet +
The default stack
+The default stack
If not configured otherwise, NixOS uses the following stack:
- NetworkManager for wifi @@ -54,7 +74,7 @@
: connects to the network, prompting for a PSK if necessaryiwctl station wlan0 connect "<SSID>"
And let's get to configuring!
-iwd
+iwd
First up is iwd. The important parts of the configuration are delegating network configuration to networkd, delegating name resolution (DNS) to resolved, and configuring MAC randomization for some extra privacy. @@ -82,7 +102,7 @@
systemd-networkd
+systemd-networkd
Next up is systemd-networkd. Networkd has lots of advanced options for things like static IP config, Wireguard tunnels, VLANs, domain-based DNS routing, and more. @@ -123,7 +143,7 @@
networkctl status : make sure there's no significant errors in the logs.systemd-resolved
+systemd-resolved
Now all we have left is DNS configuration, then we're done. This is probably the part where you can nerd out the hardest, but I try to keep it pretty minimal. @@ -152,7 +172,7 @@
You can verify your DNS configuration by using the
command or by just opening a website.
P.S. Captive portals
+P.S. Captive portals
Captive portals are those wifi login pages that pop up when you connect to some public wifi networks. Some captive portals don't behave correctly when you're using an encrypted third-party DNS server instead of the network's advertised resolver. @@ -162,7 +182,7 @@ Pretty neat!
-P.P.S. I miss nm-applet
+P.P.S. I miss nm-applet
Probably the biggest downside to this setup is the lack of desktop integration. GNOME and Plasma only support NetworkManager in their network configuration menu, so you're kinda out of luck. -- cgit v1.3.1