1 { config, pkgs, lib, ... }:
4 networkmanager.dns = "none";
5 nameservers = [ "127.0.0.1" "::1" ];
6 #resolvconf.enable = lib.mkForce false;
7 resolvconf.useLocalResolver = true;
8 dhcpcd.extraConfig = "nohook resolv.conf";
11 # Create a user for matching egress on it in the firewall
12 systemd.services.dnscrypt-proxy2.serviceConfig.User = "dnscrypt-proxy2";
13 users.users.dnscrypt-proxy2 = {
15 group = "dnscrypt-proxy2";
17 users.groups.dnscrypt-proxy2 = {};
18 services.dnscrypt-proxy2 = {
20 # https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-dnscrypt-proxy.toml
21 upstreamDefaults = true;
24 disabled_server_names = [
27 dnscrypt_servers = true;
29 fallback_resolvers = [
34 ignore_system_dns = true;
38 #proxy = "socks5://127.0.0.1:9050";
40 netprobe_timeout = 60;
46 require_dnssec = true;
47 require_nofilter = true;
49 sources.public-resolvers = {
51 "https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
52 "https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
54 cache_file = "/var/lib/dnscrypt-proxy/public-resolvers.md";
55 minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";