diff options
| author | toufic ar <contact@toufy.me> | 2026-09-21 18:42:48 +0300 |
|---|---|---|
| committer | toufic ar <contact@toufy.me> | 2026-09-21 18:42:48 +0300 |
| commit | 4cb38e0b5873eda411c59719742df36f45c4839e (patch) | |
| tree | 8dc2ea6c56a0ea88a1b7294395607ba6cd1562f0 /aphrodite/dns/default.nix | |
| parent | 400422198e97dd70c8dc7f6e681f0a096801fde1 (diff) | |
| download | servers-4cb38e0b5873eda411c59719742df36f45c4839e.tar.gz servers-4cb38e0b5873eda411c59719742df36f45c4839e.zip | |
aphrodite: remove search, add dns
Diffstat (limited to 'aphrodite/dns/default.nix')
| -rw-r--r-- | aphrodite/dns/default.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/aphrodite/dns/default.nix b/aphrodite/dns/default.nix new file mode 100644 index 0000000..6dc664d --- /dev/null +++ b/aphrodite/dns/default.nix @@ -0,0 +1,38 @@ +{config, ...}: let + domain = config.customOps.domain.fqdn; +in { + networking.firewall = { + allowedTCPPorts = [53 853]; + allowedUDPPorts = [53]; + }; + services = { + kresd = { + enable = true; + listenPlain = [ + "[::]:53" + "0.0.0.0:53" + ]; + listenTLS = [ + "[::]:853" + "0.0.0.0:853" + ]; + }; + doh-server = { + enable = true; + settings = { + path = "/"; + upstream = ["udp:127.0.0.1:53"]; + }; + }; + nginx.virtualHosts."dns.${domain}" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://127.0.0.1:8053"; + extraConfig = '' + proxy_http_version 1.1; + ''; + }; + }; + }; +} |
