]> Git — Sourcephile - julm/julm-nix.git/blob - profiles/dnscrypt-proxy2.nix
nix: update to latest nixpkgs
[julm/julm-nix.git] / profiles / dnscrypt-proxy2.nix
1 { config, pkgs, lib, ... }:
2 {
3 networking = {
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";
9 };
10 systemd.services.dnscrypt-proxy2.serviceConfig.StandardOuput = "journal";
11 services.dnscrypt-proxy2 = {
12 enable = true;
13 # https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-dnscrypt-proxy.toml
14 settings = {
15 cache = true;
16 disabled_server_names = [
17 "cloudflare"
18 ];
19 dnscrypt_servers = true;
20 doh_servers = true;
21 fallback_resolvers = [
22 "9.9.9.9:53" # Quad9
23 "8.8.8.8:53" # Google
24 ];
25 force_tcp = false;
26 ignore_system_dns = true;
27 ipv4_servers = true;
28 ipv6_servers = true;
29 log_level = 2;
30 #proxy = "socks5://127.0.0.1:9050";
31 max_clients = 250;
32 netprobe_timeout = 60;
33 query_log = {
34 file = "/dev/stdout";
35 format = "tsv";
36 ignored_qtypes = [];
37 };
38 require_dnssec = true;
39 require_nofilter = true;
40 require_nolog = true;
41 sources.public-resolvers = {
42 urls = [
43 "https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
44 "https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
45 ];
46 cache_file = "/var/lib/dnscrypt-proxy/public-resolvers.md";
47 minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
48 };
49 timeout = 5000;
50 use_syslog = true;
51 };
52 };
53 }