Compare commits

...

5 commits

Author SHA1 Message Date
1456cf626e
style(dns01): fmt
All checks were successful
lint / check (push) Successful in 22s
2024-11-22 22:16:22 +01:00
5ba783f724
fix(dns01): import lib and meta 2024-11-22 22:16:04 +01:00
a87d2160d4
fix(dns01): fmt 2024-11-22 21:54:00 +01:00
28c5c5998f
fix(dns01): fmt 2024-11-22 21:53:40 +01:00
a1a4eedd72
feat(dns01): add nodes subdomains 2024-11-22 21:52:30 +01:00
2 changed files with 38 additions and 5 deletions

View file

@ -1,11 +1,17 @@
{ dns, ... }:
{ dns, lib, ... }:
let
inherit (lib) mapAttrs' nameValuePair;
meta = (import ./../../meta) lib;
in
with dns.lib.combinators;
{
SOA = {
nameServer = "ns1";
adminEmail = "webmaster@dgnum.eu";
nameServer = "ns01.beta.dgnum.eu";
adminEmail = "dns@dgnum.eu";
serial = 2019030800;
retry = 3600;
minimum = 300;
};
NS = [
@ -16,7 +22,34 @@ with dns.lib.combinators;
#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;
# Nameservers
# TODO: fill this in
#ns01 = host "" null;
# *.infra.beta.dgnum.eu
infra = {
subdomains = mapAttrs' (
host:
{ site, ... }:
nameValuePair "${host}.${site}" (
with meta.network.${host}.addresses;
{
A = ipv4;
# FIXME: Enable ipv6 in all VM nodes
#AAAA = ipv6;
subdomains = {
v4.A = ipv4;
#v6.AAAA = ipv6;
};
}
)
) meta.nodes;
};
};
}

View file

@ -1,4 +1,4 @@
{ sources, ... }:
{ sources, lib, ... }:
let
dns = import sources.dns-nix { };
@ -10,7 +10,7 @@ in
"beta.dgnum.eu" = {
# provideXFR = [ ... ];
# notify = [ ... ];
data = dns.lib.toString "beta.dgnum.eu" (import ./beta.dgnum.eu.nix { inherit dns; });
data = dns.lib.toString "beta.dgnum.eu" (import ./beta.dgnum.eu.nix { inherit dns lib; });
};
};
};