Fix tailscale magic DNS

This commit is contained in:
Nikodem Rabuliński 2023-10-02 22:02:45 +02:00
parent 8c0e218639
commit 4feb1095ed
No known key found for this signature in database
GPG key ID: FF629AA9E08138DB
3 changed files with 14 additions and 5 deletions

View file

@ -37,11 +37,15 @@ in {
security.sudo.wheelNeedsPassword = false;
# When NetworkManager isn't in use, add tailscale DNS address manually
networking.nameservers = lib.mkIf (!nmEnabled && config.services.tailscale.enable) [
"100.100.100.100"
"1.1.1.1"
"1.0.0.1"
];
networking = lib.mkIf (!nmEnabled && config.services.tailscale.enable && cfg.tailnet != null) {
nameservers = [
"100.100.100.100"
"1.1.1.1"
"1.0.0.1"
];
search = [cfg.tailnet];
};
# NetworkManager probably means desktop system so we don't want to slow down boot times
systemd.services = lib.mkIf nmEnabled {
NetworkManager-wait-online.enable = false;