[dns] init

This commit is contained in:
2026-01-26 14:05:12 +01:00
parent 2fda92f712
commit cb5e68ef16
5 changed files with 148 additions and 5 deletions

View File

@@ -0,0 +1,39 @@
{ inputs }:
let
vpnNS = "vpn";
localNS = "hq";
peers = import ./peers.nix;
hosts = ((import ../../hosts.nix ) {}).malobeo.hosts;
in
{
SOA = {
nameServer = "ns1";
adminEmail = "admin@malobeo.org";
serial = 2019030800;
};
useOrigin = false;
NS = [
"ns1.malobeo.org."
];
A = [ "23.23.23.23" ]; #TODO: update
AAAA = [ "4321:0:1:2:3:4:567:89ab" ]; #TODO: update
subdomains = {
${localNS} = {
subdomains = builtins.mapAttrs (name: value: if value.network.local == true then {
A = [ value.network.address ];
} else {}) hosts;
};
${vpnNS} = {
A = [ peers.vpn.address ];
subdomains = builtins.mapAttrs (name: value: if value.role != "server" then {
A = [ value.address ];
} else {}) peers;
};
};
}