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;
|
2023-12-21 12:27:35 +01:00
|
|
|
web01 = {
|
2023-12-21 14:31:50 +01:00
|
|
|
CNAME = ["web01.dmi01.infra.dgnum.eu"];
|
2023-12-21 12:27:35 +01:00
|
|
|
};
|
2022-01-25 18:12:54 +01:00
|
|
|
public-cof-ips = {
|
|
|
|
A = [ "45.13.104.27" ];
|
|
|
|
AAAA = [ "2001:470:1f13:187:c08e:feff:fe4d:f5f5" ];
|
|
|
|
};
|
2021-07-26 01:29:05 +02:00
|
|
|
delegateACMEDNSChallenge = acme: { _acme-challenge.CNAME = [ acme ]; };
|
2021-07-28 23:55:23 +02:00
|
|
|
|
2022-09-10 15:29:51 +02:00
|
|
|
mkProxyRecord = AAAA: { inherit AAAA; A = [ "45.13.104.29" ]; };
|
2021-12-19 14:51:12 +01:00
|
|
|
dualstack = {
|
|
|
|
A = my.ipv4;
|
|
|
|
AAAA = my.ipv6.standard;
|
|
|
|
};
|
2021-07-26 01:29:05 +02:00
|
|
|
in
|
2021-12-19 14:51:12 +01:00
|
|
|
dualstack // {
|
2021-07-26 01:29:05 +02:00
|
|
|
SOA = {
|
|
|
|
nameServer = "ns1.${my.subZone}.";
|
|
|
|
adminEmail = my.email;
|
2023-12-21 14:31:50 +01:00
|
|
|
serial = 2023122101; # Y M D Version
|
2021-07-26 01:29:05 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
NS = [
|
|
|
|
"ns1.${my.subZone}."
|
|
|
|
];
|
|
|
|
|
|
|
|
CAA = letsEncrypt my.email;
|
|
|
|
|
|
|
|
subdomains = {
|
2023-12-21 12:27:35 +01:00
|
|
|
git = web01;
|
2021-12-19 14:51:12 +01:00
|
|
|
drone = dualstack;
|
|
|
|
monitoring = dualstack;
|
|
|
|
auth = dualstack;
|
|
|
|
push = dualstack;
|
|
|
|
core01 = dualstack;
|
|
|
|
ns1 = dualstack;
|
2021-07-26 01:29:05 +02:00
|
|
|
|
2022-10-29 17:31:46 +02:00
|
|
|
# Non-beta service
|
|
|
|
# Outline
|
2023-12-21 12:27:35 +01:00
|
|
|
notion = web01;
|
2022-10-29 17:31:46 +02:00
|
|
|
# S3 API
|
2023-12-21 12:27:35 +01:00
|
|
|
s3 = web01;
|
2022-10-29 17:31:46 +02:00
|
|
|
# CDN API
|
2023-12-21 12:27:35 +01:00
|
|
|
cdn = web01;
|
2021-07-28 23:55:23 +02:00
|
|
|
|
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
|
|
|
};
|
2021-07-26 01:29:05 +02:00
|
|
|
|
|
|
|
acme = {
|
|
|
|
NS = [ "acme.${my.subZone}." ];
|
2022-01-25 00:37:12 +01:00
|
|
|
A = my.ipv4;
|
2021-12-19 14:51:12 +01:00
|
|
|
AAAA = [ my.ipv6.acme ];
|
2021-07-26 01:29:05 +02:00
|
|
|
};
|
|
|
|
|
2022-01-25 18:12:54 +01:00
|
|
|
beta = public-cof-ips // {
|
2021-12-19 14:51:12 +01:00
|
|
|
subdomains = {
|
2022-09-10 15:29:51 +02:00
|
|
|
traque = mkProxyRecord [ "2001:470:1f13:187:f053:94ff:fe46:9664" ];
|
2023-12-21 12:27:35 +01:00
|
|
|
nuage = web01;
|
|
|
|
todo = web01;
|
|
|
|
minecraft = web01;
|
|
|
|
factorio = web01;
|
|
|
|
home = web01;
|
|
|
|
pads = web01 // {
|
2022-01-25 18:12:54 +01:00
|
|
|
subdomains = {
|
2023-12-21 12:27:35 +01:00
|
|
|
api = web01;
|
|
|
|
files = web01;
|
|
|
|
sandbox = web01;
|
2022-01-25 18:12:54 +01:00
|
|
|
};
|
2022-01-24 22:04:43 +01:00
|
|
|
};
|
2023-12-21 12:27:35 +01:00
|
|
|
docs = web01;
|
|
|
|
jurisprudens = web01;
|
|
|
|
rstudio = web01;
|
2021-11-13 00:59:59 +01:00
|
|
|
};
|
2021-12-19 14:51:12 +01:00
|
|
|
};
|
2021-08-04 15:59:21 +02:00
|
|
|
|
2021-11-15 00:09:44 +01: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" ];
|
2022-01-24 22:04:43 +01:00
|
|
|
router02.A = [ "10.1.1.1" ];
|
2021-08-04 15:59:02 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|