aboutsummaryrefslogtreecommitdiffstats
path: root/modules/common/vhack/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/common/vhack/default.nix')
-rw-r--r--modules/common/vhack/default.nix21
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;