Skip to content

Stabilize Clash Verge DNS and autostart - #2

Merged
martrtr merged 2 commits into
mainfrom
agent/stabilize-clash-verge-dns
Aug 18, 2026
Merged

Stabilize Clash Verge DNS and autostart#2
martrtr merged 2 commits into
mainfrom
agent/stabilize-clash-verge-dns

Conversation

@martrtr

@martrtr martrtr commented Aug 18, 2026

Copy link
Copy Markdown
Owner

What changed

  • enable systemd-resolved and let NetworkManager feed per-link DNS into it
  • add Cloudflare and Google DNS as fallback resolvers so /etc/resolv.conf never becomes an empty resolvconf stub when Clash Verge/Mihomo is stopped or fails
  • move clash-verge-autostart.service from niri.service to graphical-session.target so the GUI is started as part of the active graphical user session

Why

The current setup can leave /etc/resolv.conf with no nameservers, which kills all hostname resolution even when the physical network is otherwise up. Clash Verge TUN itself is already enabled and the Mihomo/Meta firewall handling is already present, so those parts are intentionally left unchanged.

Notes

The apparent tun: false vs enable_tun_mode: true mismatch in Clash Verge files is not treated as the root cause here: Clash Verge builds runtime Mihomo configuration from multiple files, and the seeded active profile already has TUN and DNS enabled.

Validation

Compared against main: only modules/core/default.nix and home/mart/session-services.nix change. The NixOS services.resolved module automatically switches NetworkManager DNS handling to systemd-resolved and owns /etc/resolv.conf, which is the intended integration path.

@martrtr
martrtr marked this pull request as ready for review August 18, 2026 18:11
@martrtr
martrtr merged commit 1a879d3 into main Aug 18, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant