dns-resilience: Hardened systemd-resolved with scoped host enablement

Add hardened systemd-resolved DNS with boot verification and journal recovery,
enabled only on specific hosts:
- hl-bigbox1, hl-bigbox2 (experienced DNS resilience issues)
- hl-minipc1, hl-minipc2, hl-minipc3 (minipc cluster)
- hl-fwdesk, hl-fws1 (desktop/workstation nodes)

Changes:
1. New module: modules/nixos/common/dns/default.nix
   - systemd-resolved with LLMNR fallback and DNSSEC tolerance
   - Hardened journald with persistent storage and auto-recovery
   - Boot-time DNS verification service with 5 retries
   - Systemd watchdog for automatic reboot on DNS failure

2. Default to false, enabled explicitly on target hosts only
3. Updated host configs to enable dns resilience module
This commit is contained in:
Hermenix committed 2026-11-17 18:25:20 +00:00
1 parent d7875b588e
commit ff770c1d03
11 files changed
+288 -2

No files matched your search

@@ -22,6 +22,7 @@
"network-online.target"
"agenix.service"
"remote-fs.target"
"dns-boot-check.service"
]
++ lib.optional hasFiles fileServiceDep;
requires = [ runtimeService ]
@@ -108,7 +109,7 @@
description = "Restart container service group '${groupName}' on env file changes";
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.systemd}/bin/systemctl restart --no-block container-services-${groupName}.service";
ExecStart = "${pkgs.systemd}/bin/systemctl restart container-services-${groupName}.service";
};
};
};