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). --- modules/common/vhack/default.nix | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'modules/common/vhack') diff --git a/modules/common/vhack/default.nix b/modules/common/vhack/default.nix index 4c9e2ae..5821ed9 100644 --- a/modules/common/vhack/default.nix +++ b/modules/common/vhack/default.nix @@ -1,4 +1,8 @@ -{...}: { +{ + lib, + config, + ... +}: { vhack = { anubis.enable = true; @@ -28,6 +32,21 @@ nixconfig.enable = true; openssh.enable = true; + # A local dns server is not _necessary_ but it helps, especially with resolving the + # local zones we advertise via nsd. + unbound.enable = true; + + # Both servers host the same zones, because why not, it at least improves redundancy + nsd = { + enable = true; + openFirewall = true; + interfaces = [ + (builtins.head config.networking.interfaces.eth0.ipv4.addresses).address + (builtins.head config.networking.interfaces.eth0.ipv6.addresses).address + ]; + zones = import ../../../zones {inherit lib;}; + }; + persist = { enable = true; -- cgit v1.3.1