From 03d15fa3744849235ea0dba976cd6582afca4499 Mon Sep 17 00:00:00 2001 From: Soispha Peetz Date: Thu, 26 Nov 2026 21:48:07 +0100 Subject: modules/dns: Separate into `nsd` and `unbound` module They are two sides of a coin, but it makes more sense to be able to only enable one but not the other (at least in `unbounds` case). --- tests/common/dns/client.nix | 2 +- tests/common/dns/server.nix | 5 ++++- tests/default.nix | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/common/dns/client.nix b/tests/common/dns/client.nix index e55000d..2e057a9 100644 --- a/tests/common/dns/client.nix +++ b/tests/common/dns/client.nix @@ -7,5 +7,5 @@ # resolving, as there is no internet access. # Instead of doing the dance with root dns servers and what-not, we just force them # to directly connect to our authoritative dns server for the zones we have. - networking.nameservers = lib.mkForce nodes.name_server.vhack.dns.interfaces; + networking.nameservers = lib.mkForce nodes.name_server.vhack.nsd.interfaces; } diff --git a/tests/common/dns/server.nix b/tests/common/dns/server.nix index be8d3e1..5f8d470 100644 --- a/tests/common/dns/server.nix +++ b/tests/common/dns/server.nix @@ -8,7 +8,10 @@ ]; vhack = { - dns = { + # Enable unbound, so we can resolve our own zones. + unbound.enable = true; + + nsd = { enable = true; openFirewall = true; interfaces = [ diff --git a/tests/default.nix b/tests/default.nix index b9d741b..fd53457 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -99,7 +99,7 @@ ./common/dns/server.nix ]; - vhack.dns.zones = let + vhack.nsd.zones = let mkDomain = attr: let split = splitAttr attr; in { @@ -128,7 +128,7 @@ (pkgs.lib.mapAttrs' (nodeName: dnsOverride: { name = "name_server"; value = {nodes, ...}: { - vhack.dns.zones = dnsOverride {config = nodes."${nodeName}";}; + vhack.nsd.zones = dnsOverride {config = nodes."${nodeName}";}; }; }) args.dns) -- cgit v1.3.1