]> Git — Sourcephile - sourcephile-nix.git/blob - servers/mermet/nsd.nix
nix: fix NIX_PATH
[sourcephile-nix.git] / servers / mermet / nsd.nix
1 {pkgs, lib, config, ...}:
2 let
3 inherit (config) networking;
4 inherit (config.services) nsd;
5 in
6 {
7 imports = [
8 nsd/sourcephile.nix
9 ];
10 services.nsd = {
11 enable = true;
12 ipv4 = true;
13 ipv6 = true;
14 verbosity = 5;
15 #zones = {};
16 /*
17 interfaces = lib.unique [
18 #(builtins.elemAt networking.interfaces."${networking.defaultGateway.interface}".ipv4.addresses 0).address
19 #networking.privateIPv4
20 ];
21 */
22 # SEE: http://www.nlnetlabs.nl/blog/2012/10/11/nsd-ratelimit/
23 ratelimit.enable = true;
24 # 100 less than the default to preserve a few Mio of RAM
25 ratelimit.size = 10000;
26 ratelimit.ratelimit = 200;
27 extraConfig = ''
28 '';
29 };
30 }