services: adblock: use new 'settings' option
This shows that I have not upgraded the server in a while...
This commit is contained in:
parent
f376059027
commit
05f291f72a
|
@ -45,21 +45,28 @@ in
|
||||||
services.unbound = {
|
services.unbound = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
allowedAccess = [
|
settings = {
|
||||||
"127.0.0.0/24"
|
server = {
|
||||||
"${wgCfg.net.v4.subnet}.0/${toString wgCfg.net.v4.mask}"
|
access-control = [
|
||||||
"${wgCfg.net.v6.subnet}::0/${toString wgCfg.net.v6.mask}"
|
"127.0.0.0/24 allow"
|
||||||
];
|
"${wgCfg.net.v4.subnet}.0/${toString wgCfg.net.v4.mask} allow"
|
||||||
|
"${wgCfg.net.v6.subnet}::0/${toString wgCfg.net.v6.mask} allow"
|
||||||
|
];
|
||||||
|
|
||||||
inherit (cfg) forwardAddresses interfaces;
|
interface = cfg.interfaces;
|
||||||
|
|
||||||
extraConfig = ''
|
so-reuseport = true;
|
||||||
so-reuseport: yes
|
tls-cert-bundle = "/etc/ssl/certs/ca-certificates.crt";
|
||||||
tls-cert-bundle: /etc/ssl/certs/ca-certificates.crt
|
tls-upstream = true;
|
||||||
tls-upstream: yes
|
|
||||||
|
|
||||||
include: "${pkgs.ambroisie.unbound-zones-adblock}/hosts"
|
include = "${pkgs.ambroisie.unbound-zones-adblock}/hosts";
|
||||||
'';
|
};
|
||||||
|
|
||||||
|
forward-zone = [{
|
||||||
|
name = ".";
|
||||||
|
forward-addr = cfg.forwardAddresses;
|
||||||
|
}];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue