infrastructure/machines/core-services-01/subZone.nix

90 lines
2.1 KiB
Nix
Raw Normal View History

2021-07-28 23:55:23 +02:00
{ config, lib, dns, ... }:
with dns.lib.combinators;
let
my = config.my;
upstream-v4-proxies = [ "51.15.7.181" ]; # kurisu.dual.lahfa.xyz
public-cof-ips = [ "2001:470:1f13:187:c08e:feff:fe4d:f5f5" ];
delegateACMEDNSChallenge = acme: { _acme-challenge.CNAME = [ acme ]; };
2021-07-28 23:55:23 +02:00
remoteBuilders = {
nix01 = [ "2001:470:1f13:187:1e07:c670:3958:f8f1" ];
};
in
with my.ipv6; # contains { standard, acme }
{
SOA = {
nameServer = "ns1.${my.subZone}.";
adminEmail = my.email;
2021-11-15 00:09:44 +01:00
serial = 2021111400; # Y M D Version
};
NS = [
"ns1.${my.subZone}."
];
AAAA = standard;
CAA = letsEncrypt my.email;
subdomains = {
git.AAAA = standard;
drone.AAAA = standard;
wiki.AAAA = standard;
monitoring.AAAA = standard;
auth.AAAA = standard;
push.AAAA = standard;
ns1.AAAA = standard;
beta.A = upstream-v4-proxies;
beta.AAAA = public-cof-ips;
2021-07-28 23:55:23 +02:00
builders.subdomains = lib.mapAttrs (n: AAAA: { inherit AAAA; }) remoteBuilders;
2021-11-12 00:59:59 +01:00
gdd = {
NS = [ "ns1.gdd.${my.subZone}." ];
subdomains.ns1.AAAA = [ "2001:470:1f13:187:350a:214a:639c:b97b" ];
2021-11-13 00:59:59 +01:00
AAAA = [ "2001:470:1f13:187:350a:214a:639c:b97b" ];
2021-11-12 00:59:59 +01:00
};
acme = {
NS = [ "acme.${my.subZone}." ];
AAAA = [ acme ];
};
beta.subdomains = {
nuage.A = upstream-v4-proxies;
nuage.AAAA = public-cof-ips;
minecraft.AAAA = public-cof-ips;
factorio.AAAA = public-cof-ips;
home.A = upstream-v4-proxies;
home.AAAA = public-cof-ips;
pads.AAAA = public-cof-ips;
2021-11-15 00:09:44 +01:00
pads.subdomains = {
api.AAAA = public-cof-ips;
files.AAAA = public-cof-ips;
sandbox.AAAA = public-cof-ips;
};
docs.AAAA = public-cof-ips;
};
2021-08-04 15:59:21 +02:00
2021-11-15 00:09:44 +01:00
internal.subdomains = {
# Routers
router01.A = [ "10.1.1.1" ];
router02.A = [ "10.1.1.2" ];
# Hypervisors
pve01 = {
A = [ "10.1.1.10" ];
subdomains = {
idrac.A = [ "10.1.2.20" ];
} // delegateACMEDNSChallenge "7c663a49-151c-4eea-a34f-725ff9f19d41.acme.rz.ens.wtf.";
};
# Core machines
core01.A = [ "10.1.1.20" ];
};
};
}