feat(dns01): init DNS config #9

Merged
cst1 merged 14 commits from beta_dns_config into main 2024-12-07 12:53:31 +01:00
2 changed files with 11 additions and 8 deletions
Showing only changes of commit 5ba783f724 - Show all commits

View file

@ -1,5 +1,9 @@
{ dns, ... }:
{ dns, lib, ... }:
let
inherit (lib) mapAttrs' nameValuePair;
meta = (import ./../../meta) lib;
in
with dns.lib.combinators;
{
SOA = {
@ -25,16 +29,14 @@ with dns.lib.combinators;
# Nameservers
# TODO: fill this in
ns01 = host "" null;
#ns01 = host "" null;
# *.infra.beta.dgnum.eu
infra = {
subdomains = mapAttrs' (
host:
{ _ }:
# NOTE: Originally "${host}.${site}"
# I think it makes sense to ditch the site info in the case of the lab
nameValuePair "${host}" (
{ site, ... }:
nameValuePair "${host}.${site}" (
with meta.network.${host}.addresses;
{
A = ipv4;

View file

@ -1,4 +1,4 @@
{ sources, ... }:
{ sources, lib, ... }:
let
dns = import sources.dns-nix { };
@ -10,7 +10,8 @@ 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; });
};
};
};