]> Git — Sourcephile - sourcephile-nix.git/blob - servers/mermet/nsd.nix
nix: fix cd in .envrc
[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 interfaces = lib.unique [
17 (builtins.elemAt networking.interfaces.enp1s0.ipv4.addresses 0).address
18 (builtins.elemAt networking.interfaces.enp2s0.ipv4.addresses 0).address
19 #("["+(builtins.elemAt networking.interfaces.enp1s0.ipv6.addresses 0).address+"]")
20 ];
21 # SEE: http://www.nlnetlabs.nl/blog/2012/10/11/nsd-ratelimit/
22 ratelimit.enable = true;
23 # 100 less than the default to preserve a few Mio of RAM
24 ratelimit.size = 10000;
25 ratelimit.ratelimit = 200;
26 extraConfig = ''
27 '';
28 };
29 }