diff options
| author | Soispha Peetz <soispha@b-peetz.de> | 2026-11-26 21:48:07 +0100 |
|---|---|---|
| committer | Soispha Peetz <soispha@b-peetz.de> | 2026-11-27 00:55:53 +0100 |
| commit | 03d15fa3744849235ea0dba976cd6582afca4499 (patch) | |
| tree | b5edd1a99dc820e1b91ae23154e2f4848a5a453a /modules/common/vhack | |
| parent | hosts/*: Include their deployment method in their definition (diff) | |
| download | nixos-server-03d15fa3744849235ea0dba976cd6582afca4499.zip | |
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).
Diffstat (limited to 'modules/common/vhack')
| -rw-r--r-- | modules/common/vhack/default.nix | 21 |
1 files changed, 20 insertions, 1 deletions
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; |
