From ed99a3710ef6bbdf4ccddf401c5db77f2e9d9f6c Mon Sep 17 00:00:00 2001 From: lilly <li@lly.sh> Date: Sat, 15 Mar 2025 22:17:15 +0100 Subject: [PATCH] fix dns resolution on dns servers --- systems/auth-dns.noc.eh22.intern.nix | 13 +++++++++---- systems/jool.nat64.eh22.intern.nix | 2 +- systems/resolv-dns.noc.eh22.intern/system.nix | 4 ++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/systems/auth-dns.noc.eh22.intern.nix b/systems/auth-dns.noc.eh22.intern.nix index f0c9f71..2cd2e6c 100644 --- a/systems/auth-dns.noc.eh22.intern.nix +++ b/systems/auth-dns.noc.eh22.intern.nix @@ -50,14 +50,19 @@ in # enable knot authorative dns server # ref: https://search.nüschtos.de/?query=services.knot # https://www.knot-dns.cz/docs/3.4/html/configuration.html - environment.etc = ( - lib.attrsets.mapAttrs' (name: value: { + environment.etc = + (lib.attrsets.mapAttrs' (name: value: { name = "knot/zones/noc.eh22.intern.zone"; value = { source = value; }; - }) zones - ); + }) zones) + // { + "resolv.conf".text = '' + search noc.eh22.intern eh22.intern + nameserver 10.20.25.5 + ''; + }; services.knot = { enable = true; diff --git a/systems/jool.nat64.eh22.intern.nix b/systems/jool.nat64.eh22.intern.nix index da90bfe..a829366 100644 --- a/systems/jool.nat64.eh22.intern.nix +++ b/systems/jool.nat64.eh22.intern.nix @@ -12,7 +12,7 @@ enable = true; networks = { "10-eth0" = { - matchConfig.MACAddress = "BC:24:11:41:E1:61"; + matchConfig.MACAddress = "BC:24:11:21:7F:AF"; address = [ "94.45.248.2/24" ]; gateway = [ "BC:24:11:21:7F:AF" ]; }; diff --git a/systems/resolv-dns.noc.eh22.intern/system.nix b/systems/resolv-dns.noc.eh22.intern/system.nix index b70e327..f6ed8e5 100644 --- a/systems/resolv-dns.noc.eh22.intern/system.nix +++ b/systems/resolv-dns.noc.eh22.intern/system.nix @@ -45,6 +45,10 @@ in allowedTCPPorts = [ 53 ]; allowedUDPPorts = [ 53 ]; }; + environment.etc."resolv.conf".text = '' + search noc.eh22.intern eh22.intern + nameserver 10.20.25.5 + ''; # enable knot resolv server # ref: https://search.nüschtos.de/?query=services.kresd