2024-11-22 22:16:04 +01:00
|
|
|
{ dns, lib, ... }:
|
2024-11-22 21:32:35 +01:00
|
|
|
|
2024-11-22 22:16:22 +01:00
|
|
|
let
|
2024-11-22 22:16:04 +01:00
|
|
|
inherit (lib) mapAttrs' nameValuePair;
|
|
|
|
meta = (import ./../../meta) lib;
|
|
|
|
in
|
2024-11-22 21:32:35 +01:00
|
|
|
with dns.lib.combinators;
|
|
|
|
{
|
|
|
|
SOA = {
|
2024-12-07 11:06:30 +01:00
|
|
|
nameServer = "dns01.lab.dgnum.eu";
|
2024-11-22 21:52:30 +01:00
|
|
|
adminEmail = "dns@dgnum.eu";
|
2024-11-22 21:32:35 +01:00
|
|
|
serial = 2019030800;
|
2024-11-22 21:52:30 +01:00
|
|
|
retry = 3600;
|
|
|
|
minimum = 300;
|
2024-11-22 21:32:35 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
NS = [
|
2024-12-07 11:06:30 +01:00
|
|
|
"dns01.lab.dgnum.eu."
|
2024-11-22 21:32:35 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
#A = [ "203.0.113.1" ];
|
|
|
|
#AAAA = [ "4321:0:1:2:3:4:567:89ab" ];
|
|
|
|
|
|
|
|
subdomains = {
|
2024-11-22 21:52:30 +01:00
|
|
|
# Hosted services
|
|
|
|
# NOTE: for now manually supplied, in the future automatically filled in
|
2024-11-22 21:32:35 +01:00
|
|
|
photoprism = host "129.199.146.101" null;
|
|
|
|
immich = host "129.199.146.101" null;
|
2024-11-22 21:52:30 +01:00
|
|
|
|
|
|
|
# Nameservers
|
2024-12-07 11:06:30 +01:00
|
|
|
dns01 = host "45.13.104.26" "2a0e:e701:1120:1000:ffff::45.13.104.26";
|
2024-11-22 21:52:30 +01:00
|
|
|
|
|
|
|
# *.infra.beta.dgnum.eu
|
|
|
|
infra = {
|
|
|
|
subdomains = mapAttrs' (
|
|
|
|
host:
|
2024-11-22 22:16:04 +01:00
|
|
|
{ site, ... }:
|
|
|
|
nameValuePair "${host}.${site}" (
|
2024-11-22 21:52:30 +01:00
|
|
|
with meta.network.${host}.addresses;
|
|
|
|
{
|
|
|
|
A = ipv4;
|
2024-12-06 14:43:40 +01:00
|
|
|
AAAA = ipv6;
|
2024-11-22 21:52:30 +01:00
|
|
|
|
|
|
|
subdomains = {
|
|
|
|
v4.A = ipv4;
|
2024-12-06 14:43:40 +01:00
|
|
|
v6.AAAA = ipv6;
|
2024-11-22 21:52:30 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
)
|
|
|
|
) meta.nodes;
|
|
|
|
};
|
2024-11-22 21:32:35 +01:00
|
|
|
};
|
|
|
|
}
|