wireguard/support: Remove DNS records for peers
For this use case, DNS is not very useful.
This commit is contained in:
parent
f8fa17c602
commit
dc3a17ffe0
|
@ -49,33 +49,5 @@ in
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
"net.ipv4.ip_forward" = lib.mkOverride 998 1;
|
"net.ipv4.ip_forward" = lib.mkOverride 998 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.bind = {
|
|
||||||
enable = true;
|
|
||||||
zones = lib.singleton {
|
|
||||||
name = "support.vpn.sbruder.de";
|
|
||||||
master = true;
|
|
||||||
file =
|
|
||||||
let
|
|
||||||
# !!! very hacky
|
|
||||||
hexStringToInt = hex: (builtins.fromTOML "int = 0x${hex}").int;
|
|
||||||
|
|
||||||
peerRecords = lib.concatStrings
|
|
||||||
(lib.mapAttrsToList
|
|
||||||
(peer: peerConfig: ''
|
|
||||||
${peer} IN A ${peerConfig.address}
|
|
||||||
'')
|
|
||||||
peers);
|
|
||||||
|
|
||||||
peerRecordsHash = builtins.hashString "sha256" peerRecords;
|
|
||||||
serial = hexStringToInt (lib.substring 0 8 peerRecordsHash);
|
|
||||||
in
|
|
||||||
pkgs.writeText "support.vpn.sbruder.de.zone" (''
|
|
||||||
$TTL 3600
|
|
||||||
@ IN SOA ${serverHostName}.sbruder.de. hostmaster.sbruder.de. ${toString serial} 28800 3600 604800 3600
|
|
||||||
@ IN NS ${serverHostName}.sbruder.de.
|
|
||||||
'' + peerRecords);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue