2024-05-29 19:48:27 +02:00
|
|
|
{ config, ... }:
|
2024-04-22 17:42:51 +02:00
|
|
|
{
|
|
|
|
services.coredns = {
|
|
|
|
enable = true;
|
|
|
|
|
2024-07-04 15:07:10 +02:00
|
|
|
extraArgs = [ "-quiet" ];
|
|
|
|
|
2024-04-22 17:42:51 +02:00
|
|
|
config = ''
|
2024-06-11 15:49:18 +02:00
|
|
|
.:5454 {
|
|
|
|
bind lo
|
|
|
|
reload 5s
|
2024-07-15 23:53:39 +02:00
|
|
|
file /etc/coredns/tailscale.zone datarift.nl {
|
2024-07-03 15:17:43 +02:00
|
|
|
reload 10s
|
|
|
|
}
|
2024-10-29 01:11:02 +01:00
|
|
|
forward . 1.1.1.1
|
2024-04-23 19:40:52 +02:00
|
|
|
log
|
2024-06-08 17:36:11 +02:00
|
|
|
debug
|
2024-04-23 19:40:52 +02:00
|
|
|
errors
|
|
|
|
}
|
|
|
|
|
2024-06-08 17:36:11 +02:00
|
|
|
.:5455 {
|
|
|
|
bind lo
|
|
|
|
reload 5s
|
2024-07-15 23:53:39 +02:00
|
|
|
file /etc/coredns/datarift.zone datarift.nl {
|
2024-06-08 17:36:11 +02:00
|
|
|
reload 10s
|
|
|
|
}
|
2024-10-29 01:11:02 +01:00
|
|
|
forward . 1.1.1.1
|
2024-04-22 17:42:51 +02:00
|
|
|
log
|
2024-06-08 17:36:11 +02:00
|
|
|
debug
|
2024-04-22 17:42:51 +02:00
|
|
|
errors
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-07-15 23:53:39 +02:00
|
|
|
environment.etc = {
|
|
|
|
"coredns/datarift.zone" = {
|
|
|
|
source = ./datarift.zone;
|
|
|
|
mode = "0644";
|
|
|
|
};
|
|
|
|
"coredns/tailscale.zone" = {
|
|
|
|
source = ./tailscale.zone;
|
|
|
|
mode = "0644";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-04-23 16:52:30 +02:00
|
|
|
systemd.services.coredns = {
|
|
|
|
environment = {
|
|
|
|
HOME = "%S/coredns";
|
|
|
|
};
|
|
|
|
serviceConfig = {
|
|
|
|
StateDirectory = "coredns";
|
|
|
|
EnvironmentFile = [ config.sops.secrets.coredns-env.path ];
|
|
|
|
};
|
|
|
|
};
|
2024-04-22 17:42:51 +02:00
|
|
|
}
|