2024-12-22 02:37:15 +01:00
|
|
|
{
|
|
|
|
meta,
|
|
|
|
dns,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-12-07 12:53:31 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib) mapAttrs' nameValuePair;
|
|
|
|
in
|
|
|
|
with dns.lib.combinators;
|
|
|
|
{
|
|
|
|
SOA = {
|
|
|
|
nameServer = "ns01.lab.dgnum.eu";
|
|
|
|
adminEmail = "dns@dgnum.eu";
|
|
|
|
serial = 2019030800;
|
|
|
|
retry = 3600;
|
|
|
|
minimum = 300;
|
|
|
|
};
|
|
|
|
|
|
|
|
NS = [ "ns01.lab.dgnum.eu." ];
|
|
|
|
|
|
|
|
#A = [ "203.0.113.1" ];
|
|
|
|
#AAAA = [ "4321:0:1:2:3:4:567:89ab" ];
|
|
|
|
|
|
|
|
subdomains = {
|
|
|
|
# Hosted services
|
|
|
|
# NOTE: for now manually supplied, in the future automatically filled in
|
|
|
|
photoprism = host "129.199.146.101" null;
|
|
|
|
immich = host "129.199.146.101" null;
|
|
|
|
|
2024-12-07 14:44:37 +01:00
|
|
|
homebox = host "129.199.146.102" null;
|
|
|
|
|
2024-12-07 16:26:03 +01:00
|
|
|
status = host "129.199.146.103" null;
|
|
|
|
|
2024-12-22 02:37:15 +01:00
|
|
|
kfet = host "129.199.146.230" "2a0e:e701:1120:1000::f:1";
|
|
|
|
|
2024-12-07 12:53:31 +01:00
|
|
|
# Nameservers
|
|
|
|
ns01 = host "45.13.104.26" "2a0e:e701:1120:1000:ffff::45.13.104.26";
|
|
|
|
|
2024-12-07 14:44:37 +01:00
|
|
|
# *.infra.lab.dgnum.eu
|
2024-12-07 12:53:31 +01:00
|
|
|
infra = {
|
|
|
|
subdomains = mapAttrs' (
|
|
|
|
host:
|
|
|
|
{ site, ... }:
|
|
|
|
nameValuePair "${host}.${site}" (
|
|
|
|
with meta.network.${host}.addresses;
|
|
|
|
{
|
|
|
|
A = ipv4;
|
|
|
|
AAAA = ipv6;
|
|
|
|
|
|
|
|
subdomains = {
|
|
|
|
v4.A = ipv4;
|
|
|
|
v6.AAAA = ipv6;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
)
|
|
|
|
) meta.nodes;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|