2024-02-04 00:05:28 +00:00
|
|
|
{
|
|
|
|
flake,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
age.secrets."unbound_control.key" = {
|
|
|
|
file = "${flake.self}/secrets/unbound_control.key.age";
|
|
|
|
mode = "400";
|
|
|
|
owner = "unbound";
|
|
|
|
};
|
|
|
|
|
|
|
|
age.secrets."unbound_control.pem" = {
|
|
|
|
file = "${flake.self}/secrets/unbound_control.pem.age";
|
|
|
|
mode = "400";
|
|
|
|
owner = "unbound";
|
|
|
|
};
|
|
|
|
|
|
|
|
age.secrets."unbound_server.key" = {
|
|
|
|
file = "${flake.self}/secrets/unbound_server.key.age";
|
|
|
|
mode = "400";
|
|
|
|
owner = "unbound";
|
|
|
|
};
|
|
|
|
|
|
|
|
age.secrets."unbound_server.pem" = {
|
|
|
|
file = "${flake.self}/secrets/unbound_server.pem.age";
|
|
|
|
mode = "400";
|
|
|
|
owner = "unbound";
|
|
|
|
};
|
|
|
|
|
2024-08-18 22:22:59 +00:00
|
|
|
networking.firewall.interfaces.wg-private.allowedUDPPorts = [53];
|
|
|
|
networking.firewall.interfaces.wg-private.allowedTCPPorts = [53];
|
2024-02-04 00:05:28 +00:00
|
|
|
services.resolved.enable = false;
|
|
|
|
|
|
|
|
services.unbound = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
server = {
|
|
|
|
include = [
|
|
|
|
"\"${pkgs.adlist.unbound-adblockStevenBlack}\""
|
|
|
|
];
|
|
|
|
interface = [
|
|
|
|
"127.0.0.1"
|
|
|
|
"::1"
|
|
|
|
|
2024-02-08 18:23:22 +00:00
|
|
|
"10.13.12.7"
|
2024-02-04 00:05:28 +00:00
|
|
|
"fd00:b12f:acab:1312:acab:7::"
|
|
|
|
];
|
|
|
|
access-control = [
|
|
|
|
"127.0.0.1/32 allow"
|
|
|
|
|
|
|
|
# Allow from wireguard
|
2024-02-08 18:23:22 +00:00
|
|
|
"10.13.12.0/24 allow"
|
2024-02-04 00:05:28 +00:00
|
|
|
"fd00:b12f:acab:1312::/64 allow"
|
|
|
|
];
|
|
|
|
local-zone = [
|
|
|
|
"\"b12f.io\" transparent"
|
2024-11-12 21:30:16 +00:00
|
|
|
"\"pub.solar\" transparent"
|
2024-02-04 00:05:28 +00:00
|
|
|
];
|
|
|
|
local-data = [
|
2024-06-03 10:29:05 +00:00
|
|
|
"\"stroopwafel.b12f.io. 10800 IN A 10.13.12.5\""
|
|
|
|
"\"stroopwafel.b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:5::\""
|
|
|
|
|
|
|
|
"\"chocolatebar.b12f.io. 10800 IN A 10.13.12.8\""
|
|
|
|
"\"chocolatebar.b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:8::\""
|
|
|
|
|
2024-04-01 17:07:24 +00:00
|
|
|
"\"droppie.b12f.io. 10800 IN A 10.13.12.3\""
|
|
|
|
"\"droppie.b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:3::\""
|
|
|
|
|
2024-02-08 18:23:22 +00:00
|
|
|
"\"droppie.b12f.io. 10800 IN A 10.13.12.3\""
|
2024-02-04 00:05:28 +00:00
|
|
|
"\"droppie.b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:3::\""
|
2024-02-08 18:23:22 +00:00
|
|
|
"\"backup.b12f.io. 10800 IN A 10.13.12.3\""
|
2024-02-04 00:05:28 +00:00
|
|
|
"\"backup.b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:3::\""
|
2024-02-27 08:43:00 +00:00
|
|
|
"\"media.b12f.io. 10800 IN A 10.13.12.3\""
|
|
|
|
"\"media.b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:3::\""
|
2024-02-04 00:05:28 +00:00
|
|
|
|
2024-02-08 18:23:22 +00:00
|
|
|
"\"pie.b12f.io. 10800 IN A 10.13.12.2\""
|
2024-02-04 00:05:28 +00:00
|
|
|
"\"pie.b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:2::\""
|
2024-02-08 18:23:22 +00:00
|
|
|
"\"firefly.b12f.io. 10800 IN A 10.13.12.2\""
|
2024-02-04 00:05:28 +00:00
|
|
|
"\"firefly.b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:2::\""
|
2024-02-08 18:23:22 +00:00
|
|
|
"\"firefly-importer.b12f.io. 10800 IN A 10.13.12.2\""
|
2024-02-04 00:05:28 +00:00
|
|
|
"\"firefly-importer.b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:2::\""
|
2024-02-08 18:23:22 +00:00
|
|
|
"\"paperless.b12f.io. 10800 IN A 10.13.12.2\""
|
2024-02-04 00:05:28 +00:00
|
|
|
"\"paperless.b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:2::\""
|
2024-02-08 18:23:22 +00:00
|
|
|
"\"invoicing.b12f.io. 10800 IN A 10.13.12.2\""
|
2024-02-04 00:05:28 +00:00
|
|
|
"\"invoicing.b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:2::\""
|
2024-04-03 19:02:21 +00:00
|
|
|
"\"auth.b12f.io. 10800 IN A 10.13.12.2\""
|
|
|
|
"\"auth.b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:2::\""
|
2024-02-04 00:05:28 +00:00
|
|
|
|
|
|
|
"\"vpn.b12f.io. 10800 IN A 128.140.109.213\""
|
|
|
|
"\"vpn.b12f.io. 10800 IN AAAA 2a01:4f8:c2c:b60::\""
|
|
|
|
|
2024-02-08 18:23:22 +00:00
|
|
|
"\"frikandel.b12f.io. 10800 IN A 10.13.12.7\""
|
2024-02-04 00:05:28 +00:00
|
|
|
"\"frikandel.b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:7::\""
|
2024-03-25 18:13:19 +00:00
|
|
|
"\"b12f.io. 10800 IN A 10.13.12.7\""
|
|
|
|
"\"b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:7::\""
|
|
|
|
"\"mail.b12f.io. 10800 IN A 10.13.12.7\""
|
|
|
|
"\"mail.b12f.io. 10800 IN AAAA fd00:b12f:acab:1312:acab:7::\""
|
2024-08-16 19:33:49 +00:00
|
|
|
|
|
|
|
"\"mezza.biz. 10800 IN A 10.13.12.7\""
|
|
|
|
"\"mezza.biz. 10800 IN AAAA fd00:b12f:acab:1312:acab:7::\""
|
|
|
|
"\"mail.mezza.biz. 10800 IN A 10.13.12.7\""
|
|
|
|
"\"mail.mezza.biz. 10800 IN AAAA fd00:b12f:acab:1312:acab:7::\""
|
|
|
|
|
2024-08-18 22:22:59 +00:00
|
|
|
"\"h${"w" + "dz" + "z.n"}et. 10800 IN A 10.13.12.7\""
|
|
|
|
"\"h${"w" + "dz" + "z.n"}et. 10800 IN AAAA fd00:b12f:acab:1312:acab:7::\""
|
|
|
|
"\"mail.h${"w" + "dz" + "z.n"}et. 10800 IN A 10.13.12.7\""
|
|
|
|
"\"mail.h${"w" + "dz" + "z.n"}et. 10800 IN AAAA fd00:b12f:acab:1312:acab:7::\""
|
2024-11-12 21:30:16 +00:00
|
|
|
|
|
|
|
"\"mezza.git.pub.solar. 10800 IN CNAME git.pub.solar\""
|
2024-02-04 00:05:28 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
tls-cert-bundle = "/etc/ssl/certs/ca-certificates.crt";
|
|
|
|
};
|
|
|
|
|
|
|
|
forward-zone = [
|
|
|
|
{
|
|
|
|
name = ".";
|
|
|
|
forward-addr = [
|
|
|
|
"193.110.81.0#dns0.eu"
|
|
|
|
"2a0f:fc80::#dns0.eu"
|
|
|
|
"185.253.5.0#dns0.eu"
|
|
|
|
"2a0f:fc81::#dns0.eu"
|
|
|
|
];
|
|
|
|
forward-tls-upstream = "yes";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
remote-control = {
|
|
|
|
control-enable = true;
|
|
|
|
control-key-file = config.age.secrets."unbound_control.key".path;
|
|
|
|
server-cert-file = config.age.secrets."unbound_server.pem".path;
|
|
|
|
server-key-file = config.age.secrets."unbound_server.key".path;
|
|
|
|
control-cert-file = config.age.secrets."unbound_control.pem".path;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|