Finish an `omarchy dns` change that aborts on a bridge or bond port profile
Read /usr/bin/omarchy-dns on 4.0.4-1 and the quattro copy, which are byte-identical. Issue #11448 (open) states the exact error, exit 2, and the type-only filter, and the script confirms set -euo pipefail and the 802-11-wireless/802-3-ethernet filter. Two defects in the record. First, the claim that omarchy dns reports DHCP after an aborted DHCP run does not follow from the script: the DHCP branch deletes the NetworkManager drop-in and then dies before rewriting /etc/systemd/resolved.conf, so current_dns_provider falls back to resolved.conf, which still holds the Cloudflare DNS= line, and reports Cloudflare. The issue reporter did see DHCP, so the corrected text says the indicator ignores per-profile pins and can disagree with resolvectl in either direction. Second, the manual fix modifies profiles but never reapplies them to active devices, which the script itself does with nmcli device reapply because reload dns-full only republishes the already-applied settings. Without that, the connected network keeps its pinned servers until reconnected. The reload also needs root (polkit gives NetworkManager.reload auth_admin_keep). The fix is rewritten with reapply and sudo, and gives the Cloudflare branch verbatim from the script rather than telling the reader to copy it. Not exercised: no bridge profile was created on this workstation.
Symptom
Changing the DNS provider from the menu seems to work, but some networks keep the old DNS. Run from a terminal it fails:
$ omarchy dns DHCP
Error: invalid or not allowed setting 'ipv4': port connections cannot have IP configuration.
and exits with status 2. Afterwards omarchy dns can name a provider that does not match what resolvectl dns shows on some links, so captive portals and VPN DNS keep failing. It happens on machines with a NetworkManager bridge or bond, for example a br0 for libvirt.
Cause
omarchy-dns loops over every saved profile and selects candidates by connection type only (802-11-wireless or 802-3-ethernet). A bridge or bond member is an 802-3-ethernet profile with connection.controller set, and NetworkManager refuses any IP setting on a port profile. The script runs under set -euo pipefail, so the first refusal kills the whole run part way through.
In the DHCP branch the global file /etc/NetworkManager/conf.d/20-omarchy-dns.conf is removed first, then the per-profile loop dies. Profiles after the port keep their pinned servers, /etc/systemd/resolved.conf keeps its previous DNS= line, and the final reload that reapplies active connections never runs. In the Cloudflare and Google branches the drop-in is written first, then the same abort leaves later profiles and resolved.conf on the old provider.
omarchy dns with no argument reads only the drop-in and the DNS= line in resolved.conf, never the per-profile settings, so it can report a provider that some links are not using (the issue reporter saw DHCP while three of four profiles still forced Cloudflare). Confirmed in bin/omarchy-dns on 4.0.4-1 and on quattro, upstream issue #11448, still open.
Fix
Do by hand what the script would have done, skipping port profiles. For DHCP:
sudo rm -f /etc/NetworkManager/conf.d/20-omarchy-dns.conf
while IFS=: read -r uuid type; do
case "$type" in 802-11-wireless|802-3-ethernet) ;; *) continue ;; esac
[[ -z $(nmcli -g connection.controller connection show "$uuid") ]] || continue
sudo nmcli connection modify "$uuid" \
ipv4.ignore-auto-dns no ipv4.dns "" \
ipv6.ignore-auto-dns no ipv6.dns ""
done < <(nmcli -t -f UUID,TYPE connection show)
sudo tee /etc/systemd/resolved.conf >/dev/null <<'EOF'
[Resolve]
DNSOverTLS=no
EOF
For Cloudflare instead, write the drop-in and pin the profiles, then use the script's own resolved.conf block:
sudo tee /etc/NetworkManager/conf.d/20-omarchy-dns.conf >/dev/null <<'EOF'
# Managed by omarchy-dns. Remove this file or run omarchy dns DHCP to use DHCP DNS again.
[global-dns]
[global-dns-domain-*]
servers=1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001
EOF
while IFS=: read -r uuid type; do
case "$type" in 802-11-wireless|802-3-ethernet) ;; *) continue ;; esac
[[ -z $(nmcli -g connection.controller connection show "$uuid") ]] || continue
sudo nmcli connection modify "$uuid" \
ipv4.ignore-auto-dns yes ipv4.dns "1.1.1.1 1.0.0.1" \
ipv6.ignore-auto-dns yes ipv6.dns "2606:4700:4700::1111 2606:4700:4700::1001"
done < <(nmcli -t -f UUID,TYPE connection show)
sudo tee /etc/systemd/resolved.conf >/dev/null <<'EOF'
[Resolve]
DNS=1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
FallbackDNS=9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
DNSOverTLS=opportunistic
EOF
For Google, take the matching block from /usr/bin/omarchy-dns.
Then, in either case, reload and push the changed profiles onto the connected devices. A modified profile does not reach an active connection until it is reapplied:
sudo nmcli general reload conf
nmcli -t -f DEVICE,TYPE,STATE device status | while IFS=: read -r dev type state; do
if [[ $state == connected && ( $type == wifi || $type == ethernet ) ]]; then
sudo nmcli device reapply "$dev" || true
fi
done
sudo systemctl restart systemd-resolved
sudo nmcli general reload dns-full
The bridge itself (type bridge) is not in the script's loop at all, so its DNS is whatever its own profile says. Check it separately with nmcli -g ipv4.dns,ipv4.ignore-auto-dns connection show <bridge>. Until #11448 is fixed, every provider change from the menu on this machine aborts the same way and needs these steps again.
Verify
resolvectl dns # every link should show the servers you expect
nmcli -t -f NAME,TYPE connection show | while IFS=: read -r n t; do
printf '%s: %s\n' "$n" "$(nmcli -g ipv4.dns connection show "$n")"
done