Repair /etc/resolv.conf after an update repoints it at systemd-resolved
Layout A is correct and complete. Layout B is not: it never removes or overrides the [main] dns=systemd-resolved setting that layout A creates and that Omarchy ships by default, and it does not remove /etc/NetworkManager/conf.d/20-omarchy-dns.conf. With dns=systemd-resolved still in effect, NetworkManager pushes resolvers into resolved and does not populate /run/NetworkManager/resolv.conf, so the new symlink points at a file that stays empty or absent and DNS is still dead. It should also stop the leftover stub listener cleanly.
Deleting /etc/resolv.conf while it is a regular file loses hand-written nameservers. Copy it first: sudo cp -a /etc/resolv.conf /root/resolv.conf.bak.
Symptom
DNS stops working right after a system update. Nothing resolves. Browsers fail and ping google.com says Temporary failure in name resolution, but IP addresses still ping fine. ls -l /etc/resolv.conf shows it is now a symlink to /run/systemd/resolve/stub-resolv.conf on a machine that uses NetworkManager's own resolver and has systemd-resolved disabled.
Cause
The update replaced the resolv.conf symlink with the systemd-resolved layout without checking whether systemd-resolved is actually enabled. The symlink target does not exist (or the stub listener is not running), so every lookup fails.
Fix
**A. You want systemd-resolved (the Omarchy 4.x default):** as written in the record, it is correct.
**B. You want NetworkManager to manage resolv.conf itself:**
sudo systemctl disable --now systemd-resolved
# Tell NetworkManager to stop handing DNS to resolved (this step is the missing one)
sudo rm -f /etc/NetworkManager/conf.d/10-dns.conf /etc/NetworkManager/conf.d/20-omarchy-dns.conf
sudo tee /etc/NetworkManager/conf.d/10-dns.conf >/dev/null <<'EOF'
[main]
dns=default
rc-manager=unmanaged
EOF
sudo rm -f /etc/resolv.conf
sudo ln -s /run/NetworkManager/resolv.conf /etc/resolv.conf
sudo systemctl restart NetworkManager
# verify
ls -l /etc/resolv.conf && cat /etc/resolv.conf # must list your real nameservers
getent hosts archlinux.org
If /run/NetworkManager/resolv.conf does not exist after the restart, NetworkManager is still using a non-default dns backend. Re-check /etc/NetworkManager/conf.d/ and NetworkManager.conf for a dns= line.
Verify
resolvectl status (layout A) shows a running resolver with DNS servers per link, or cat /etc/resolv.conf (layout B) lists real nameservers. getent hosts archlinux.org returns an address.