diff --git a/modules/wireguard/support.nix b/modules/wireguard/support.nix index 8a5c954..49a7232 100644 --- a/modules/wireguard/support.nix +++ b/modules/wireguard/support.nix @@ -49,33 +49,5 @@ in boot.kernel.sysctl = { "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); - }; - }; }; }