2024-05-29 19:48:27 +02:00
|
|
|
{ config, ... }:
|
2024-04-22 17:42:51 +02:00
|
|
|
{
|
|
|
|
services.coredns = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
config = ''
|
|
|
|
datarift.nl:5454 {
|
2024-04-23 19:40:52 +02:00
|
|
|
bind 127.0.0.1 ::1
|
2024-05-08 18:36:37 +02:00
|
|
|
tailscale datarift.nl {
|
|
|
|
authkey {$TS_AUTHKEY}
|
2024-05-29 19:48:27 +02:00
|
|
|
fallthrough
|
2024-05-08 18:36:37 +02:00
|
|
|
}
|
2024-05-29 19:48:27 +02:00
|
|
|
forward . 127.0.0.1:5335
|
2024-04-23 19:40:52 +02:00
|
|
|
log
|
|
|
|
errors
|
|
|
|
}
|
|
|
|
|
|
|
|
.:5454 {
|
|
|
|
bind 127.0.0.1 ::1
|
2024-04-23 19:31:04 +02:00
|
|
|
forward . 127.0.0.1:5335
|
2024-04-22 17:42:51 +02:00
|
|
|
log
|
|
|
|
errors
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
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
|
|
|
}
|