{ config, ... }: { services.coredns = { enable = true; extraArgs = [ "-quiet" ]; config = '' .:5454 { bind lo reload 5s file ${./tailscale.zone} datarift.nl { reload 10s } forward . 127.0.0.1:5335 log debug errors } .:5455 { bind lo reload 5s file ${./datarift.zone} datarift.nl { reload 10s } forward . 127.0.0.1:5335 log debug errors } ''; }; systemd.services.coredns = { environment = { HOME = "%S/coredns"; }; serviceConfig = { StateDirectory = "coredns"; EnvironmentFile = [ config.sops.secrets.coredns-env.path ]; }; }; }