summaryrefslogtreecommitdiff
path: root/modules/dns.nix
diff options
context:
space:
mode:
authorKleidi Bujari <mail@4kb.net>2025-04-02 22:11:38 -0400
committerKleidi Bujari <mail@4kb.net>2025-04-02 22:11:38 -0400
commitc950f338c5720a132552863a35d1c7924df3d3a6 (patch)
treec3134c42e1618c255ca8e9e0698f90b0ae8b3563 /modules/dns.nix
parentb619ff9dd42eaa62569c8297142f0e4c719d40d2 (diff)
parent09c2b6de63a6ff35348fcb2c2eb57b974f0a8a52 (diff)
downloaddepot-c950f338c5720a132552863a35d1c7924df3d3a6.tar.gz
depot-c950f338c5720a132552863a35d1c7924df3d3a6.tar.bz2
depot-c950f338c5720a132552863a35d1c7924df3d3a6.zip
Merge remote-tracking branch 'origin/copy-blueprint'
Diffstat (limited to 'modules/dns.nix')
-rw-r--r--modules/dns.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/modules/dns.nix b/modules/dns.nix
new file mode 100644
index 0000000..0632fa9
--- /dev/null
+++ b/modules/dns.nix
@@ -0,0 +1,38 @@
+{ lib, ... }:
+let
+ inherit (lib)
+ mkDefault
+ ;
+
+ quad9 = [
+ "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"
+ ];
+
+ cloudflare = [
+ "1.1.1.1#one.one.one.one"
+ "1.0.0.1#one.one.one.one"
+ "2606:4700:4700::1111#one.one.one.one"
+ "2606:4700:4700::1001#one.one.one.one"
+ ];
+in
+{
+
+ networking.nameservers = mkDefault quad9;
+
+ services.resolved = {
+ enable = true;
+ llmnr = "false";
+ dnssec = "false";
+ dnsovertls = mkDefault "opportunistic";
+ fallbackDns = quad9 ++ cloudflare;
+ extraConfig = ''
+ MulticastDNS=yes
+ '';
+ };
+
+ # Allow mDNS resolution
+ networking.firewall.allowedTCPPorts = [ 5353 ];
+}