define noc.eh22.intern zone on our authorative dns server

This commit is contained in:
lilly 2025-02-10 20:17:19 +01:00
parent 5240a744a6
commit e09bf22468
Signed by: lilly
SSH key fingerprint: SHA256:y9T5GFw2A20WVklhetIxG1+kcg/Ce0shnQmbu1LQ37g

View file

@ -1,9 +1,59 @@
{ {
pkgs,
... ...
}: }:
let
noc_eh22_internZone = ''
$ORIGIN noc.eh22.intern.
$TTL 3600
; zone management
noc.eh22.intern. IN SOA auth-dns.noc.eh22.intern. noc.eh22.esterhegg.eu. (
1 ; serial (automatically incremented by knot)
7200 ; refresh
3600 ; retry
3600000 ; expire
60 ; negative response caching ttl
)
@ IN NS auth-dns
; A/AAAA records
proxmox IN A 10.31.210.248
auth-dns IN A 10.31.210.253
'';
knotConf = pkgs.writeText "knot.conf" ''
server:
listen: 0.0.0.0@53
listen: ::@53
log:
- target: syslog
any: info
template:
- id: default
storage: /etc/knot/zones
zonefile-load: difference-no-serial
semantic-checks: "on"
journal-content: all
zone:
- domain: noc.eh22.intern
'';
in
{ {
imports = [ ]; imports = [ ];
# enable knot authorative dns server
# ref: https://search.nüschtos.de/?query=services.knot
# https://www.knot-dns.cz/docs/3.4/html/configuration.html
environment.etc."knot/zones/noc.eh22.intern.zone".text = noc_eh22_internZone;
services.knot = {
enable = true;
settingsFile = knotConf;
};
# DO NOT CHANGE # DO NOT CHANGE
# this defines the first version of NixOS that was installed on the machine so that programs with non-migratable data files are kept compatible # this defines the first version of NixOS that was installed on the machine so that programs with non-migratable data files are kept compatible
home-manager.users.noc.home.stateVersion = "24.11"; home-manager.users.noc.home.stateVersion = "24.11";