2021-07-28 23:55:23 +02:00
|
|
|
{ config, lib, dns, ... }:
|
2021-07-26 01:29:05 +02:00
|
|
|
|
|
|
|
with dns.lib.combinators;
|
|
|
|
|
|
|
|
let
|
|
|
|
my = config.my;
|
|
|
|
delegateACMEDNSChallenge = acme: { _acme-challenge.CNAME = [ acme ]; };
|
2021-07-28 23:55:23 +02:00
|
|
|
|
|
|
|
remoteBuilders = {
|
|
|
|
nix01 = [ "2001:470:1f13:187:1e07:c670:3958:f8f1" ];
|
|
|
|
};
|
2021-07-26 01:29:05 +02:00
|
|
|
in
|
|
|
|
with my.ipv6; # contains { standard, acme }
|
|
|
|
{
|
|
|
|
SOA = {
|
|
|
|
nameServer = "ns1.${my.subZone}.";
|
|
|
|
adminEmail = my.email;
|
|
|
|
serial = 2021072400; # Y M D Version
|
|
|
|
};
|
|
|
|
|
|
|
|
NS = [
|
|
|
|
"ns1.${my.subZone}."
|
|
|
|
];
|
|
|
|
|
|
|
|
AAAA = standard;
|
|
|
|
|
|
|
|
CAA = letsEncrypt my.email;
|
|
|
|
|
|
|
|
subdomains = {
|
|
|
|
git.AAAA = standard;
|
2021-07-26 02:15:44 +02:00
|
|
|
drone.AAAA = standard;
|
2021-07-26 01:29:05 +02:00
|
|
|
wiki.AAAA = standard;
|
|
|
|
monitoring.AAAA = standard;
|
|
|
|
auth.AAAA = standard;
|
|
|
|
push.AAAA = standard;
|
|
|
|
ns1.AAAA = standard;
|
|
|
|
|
2021-07-28 23:55:23 +02:00
|
|
|
builders.subdomains = lib.mapAttrs (n: AAAA: { inherit AAAA; }) remoteBuilders;
|
|
|
|
|
2021-10-20 23:52:58 +02:00
|
|
|
gdd.subdomains.backup.AAAA = [ "2001:470:1f13:187:475:9fc1:1e84:4055" "2001:470:1f13:187:e8a5:fbff:fe29:42f5" "2001:470:1f13:187:350a:214a:639c:b97b" ];
|
2021-07-26 01:29:05 +02:00
|
|
|
|
|
|
|
acme = {
|
|
|
|
NS = [ "acme.${my.subZone}." ];
|
|
|
|
AAAA = [ acme ];
|
|
|
|
};
|
|
|
|
|
2021-08-04 15:59:21 +02:00
|
|
|
|
2021-07-26 01:29:05 +02:00
|
|
|
internal.subdomains = {
|
2021-08-04 15:59:02 +02:00
|
|
|
# Routers
|
|
|
|
router01.A = [ "10.1.1.1" ];
|
|
|
|
router02.A = [ "10.1.1.2" ];
|
|
|
|
|
|
|
|
# Hypervisors
|
2021-07-26 01:29:05 +02:00
|
|
|
pve01 = {
|
|
|
|
A = [ "10.1.1.10" ];
|
|
|
|
subdomains = {
|
|
|
|
idrac.A = [ "10.1.2.20" ];
|
|
|
|
} // delegateACMEDNSChallenge "7c663a49-151c-4eea-a34f-725ff9f19d41.acme.rz.ens.wtf.";
|
|
|
|
};
|
2021-08-04 15:59:02 +02:00
|
|
|
|
|
|
|
# Core machines
|
|
|
|
core01.A = [ "10.1.1.20" ];
|
2021-07-26 01:29:05 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|