blob: 72e707e7270a287eeb9973288bfad8d345ec2f76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
{ config, lib, pkgs, ... }:
{
config = {
services.unbound = {
enable = true;
resolveLocalQueries = false;
stateDir = "/var/lib/unbound";
localControlSocketPath = "/run/unbound/unbound.ctl";
settings = {
server = {
interface = ["127.0.0.1" "10.141.0.1" "::0"];
access-control = ["0.0.0.0/0 allow" "::/0 allow"];
root-hints = "${pkgs.dns-root-data}/root.hints";
num-threads = 12;
so-reuseport = true;
msg-cache-slabs = 16;
rrset-cache-slabs = 16;
infra-cache-slabs = 16;
key-cache-slabs = 16;
rrset-cache-size = "100m";
msg-cache-size = "50m";
outgoing-range = 8192;
num-queries-per-thread = 4096;
so-rcvbuf = "4m";
so-sndbuf = "4m";
# serve-expired = true;
# serve-expired-ttl = 86400;
# serve-expired-reply-ttl = 0;
prefetch = true;
prefetch-key = true;
minimal-responses = false;
extended-statistics = true;
rrset-roundrobin = true;
use-caps-for-id = true;
};
};
};
};
}
|