mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
tree-wide: make secure_dns a shared module
This commit is contained in:
parent
2dd16cded8
commit
6f73ad90fe
4 changed files with 6 additions and 64 deletions
|
|
@ -1,57 +0,0 @@
|
|||
# https://nixos.wiki/wiki/Encrypted_DNS
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
networking = {
|
||||
nameservers = ["127.0.0.1" "::1"];
|
||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
||||
# networkmanager.dns = "none";
|
||||
};
|
||||
|
||||
services.resolved.enable = false;
|
||||
|
||||
services.dnscrypt-proxy2 = {
|
||||
enable = true;
|
||||
# Settings reference:
|
||||
# https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-dnscrypt-proxy.toml
|
||||
settings = {
|
||||
listen_addresses = ["127.0.0.1:53"];
|
||||
ipv4_servers = true;
|
||||
|
||||
require_dnssec = true;
|
||||
require_nolog = true;
|
||||
require_nofilter = true;
|
||||
|
||||
lb_strategy = "p2";
|
||||
lb_estimator = true;
|
||||
|
||||
# Blocklists are made of one pattern per line.
|
||||
# https://github.com/DNSCrypt/dnscrypt-proxy/blob/fa59f990431a49b6485f63f96601bc7e64017bf8/dnscrypt-proxy/example-dnscrypt-proxy.toml#L583C4-L583C75
|
||||
blocked_names.blocked_names_file = pkgs.concatText "dnsblocklist_combined" [
|
||||
# Prevent building up reliance on chatbots
|
||||
# Gotta preserve that thinking ability of my smoof bwain
|
||||
pkgs.ai_blocklist
|
||||
pkgs.hategroup_blocklist
|
||||
|
||||
# Gotta purify my smoos brain for a while
|
||||
(pkgs.writeText "extra_dns_blocklist" ''
|
||||
instagram.com
|
||||
youtube.com
|
||||
'')
|
||||
];
|
||||
|
||||
# Add this to test if dnscrypt-proxy is actually used to resolve DNS requests
|
||||
# query_log.file = "/var/log/dnscrypt-proxy/query.log";
|
||||
sources.public-resolvers = {
|
||||
urls = [
|
||||
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
||||
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
||||
];
|
||||
cache_file = "/var/cache/dnscrypt-proxy/public-resolvers.md";
|
||||
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue