summaryrefslogtreecommitdiff
path: root/hosts/surtr/dns/default.nix
blob: c5c8fefca09d72114b95c08ca20ccf4f3a8c8f94 (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
{...}:
{
  config = {
    fileSystems."/var/lib/knot" =
      { device = "surtr/safe/var-lib-knot";
        fsType = "zfs";
      };
    
    services.knot = {
      enable = true;
      extraConfig = ''
        server:
          listen: 127.0.0.1@53
          listen: ::1@53
          listen: 202.61.241.61@53
          listen: 2a03:4000:52:ada::@53

        template:
         - id: default
           storage: /var/lib/knot
           zonefile-sync: -1
           zonefile-load: difference-no-serial
           semantic-checks: on
           dnssec-signing: on

        policy:
          - id: rsa
            algorithm: RSASHA256
            ksk-size: 4096
            zsk-size: 2048
            zsk-lifetime: 30d

        zone:
          - domain: yggdrasil.li
            file: ${./zones/li.yggdrasil.soa}
      '';
    };
  };
}