1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-15 17:51:01 +00:00

tailscale: prevent significant DNS footgun

This commit is contained in:
Michael Hoang 2022-09-20 18:03:50 +10:00
parent 0ae311e1c7
commit bdd5d81b13

View file

@ -29,6 +29,16 @@ in
};
config = mkIf cfg.enable {
assertions = [ {
assertion = !cfg.magicDNS.enable || config.networking.dns != [ "100.100.100.100" ];
message = ''
When MagicDNS is enabled, fallback DNS servers need to be set with `networking.dns`.
Otherwise, Tailscale will take a long time to connect and all DNS queries
will fail until Tailscale has connected.
'';
} ];
environment.systemPackages = [ cfg.package ];
launchd.daemons.tailscaled = {