nixos-config/machines/valkyrie/coredns/default.nix
Erwin Boskma cb7a2cd4bc
Let's roll our own coredns package
With blackjack and hoo...

Uhm, working plugins. Yes, working plugins. Definitely.
2024-05-29 19:50:20 +02:00

36 lines
640 B
Nix

{ config, ... }:
{
services.coredns = {
enable = true;
config = ''
datarift.nl:5454 {
bind 127.0.0.1 ::1
tailscale datarift.nl {
authkey {$TS_AUTHKEY}
fallthrough
}
forward . 127.0.0.1:5335
log
errors
}
.:5454 {
bind 127.0.0.1 ::1
forward . 127.0.0.1:5335
log
errors
}
'';
};
systemd.services.coredns = {
environment = {
HOME = "%S/coredns";
};
serviceConfig = {
StateDirectory = "coredns";
EnvironmentFile = [ config.sops.secrets.coredns-env.path ];
};
};
}