From c7d2db076b7237a84dd24c8b2a43845902d41a67 Mon Sep 17 00:00:00 2001 From: Toast Date: Sat, 2 Nov 2024 18:14:28 +0100 Subject: [PATCH] Server: get rid of dnsmasq I can add custom records to headscale's dns settings, so I don't need dnsmasq anymore. This will also bring back resolved's stub --- roles/server/default.nix | 1 - roles/server/dns.nix | 42 ---------------------------------------- 2 files changed, 43 deletions(-) delete mode 100644 roles/server/dns.nix diff --git a/roles/server/default.nix b/roles/server/default.nix index 4ba0396..bc1a6ea 100755 --- a/roles/server/default.nix +++ b/roles/server/default.nix @@ -13,7 +13,6 @@ ./tailscale.nix ./headscale.nix ./caddy.nix - ./dns.nix ./rust_motd.nix ./minecraft.nix ]; diff --git a/roles/server/dns.nix b/roles/server/dns.nix deleted file mode 100644 index 1e446e5..0000000 --- a/roles/server/dns.nix +++ /dev/null @@ -1,42 +0,0 @@ -{...}: { - services.dnsmasq = { - enable = true; - - # Only using this for tailscale IPs, so better to let tailscale itself deal with it - resolveLocalQueries = false; - - settings = { - listen-address = ["100.73.96.48"]; - - /* - Dnsmasq tries to use the tailscale dns server, which is bad cause that points to dnsmasq - From the little testing I have done it seems to not cause any issues, but better to be safe - than sorry :P - */ - dns-loop-detect = true; - - host-record = [ - "winmax2,winmax2.tailscale,100.106.73.20" - "everest,everest.tailscale,100.73.96.48" - "archie,archie.tailscale,100.113.139.93" - "steamdeck,steamdeck.tailscale,100.85.48.85" - "surfacego,surfacego.tailscale,100.96.92.13" - ]; - - # If this isn't set a cname that targets a host might return the wrong ip - localise-queries = true; - ## IPv6 is not a thing in Spain so I'm guaranteed to not use it - filter-AAAA = true; - domain = "tailscale"; - domain-needed = true; - }; - }; - - programs.rust-motd.settings.service_status.dnsmasq = "dnsmasq"; - - # Dnsmasq conflicts with the resolved dns stub listener - services.resolved.extraConfig = '' - [Resolve] - DNSStubListener=no - ''; -}