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

View file

@ -1,4 +1,4 @@
{ sources, ... }: { sources, lib, ... }:
let let
dns = import sources.dns-nix { }; dns = import sources.dns-nix { };
@ -10,7 +10,8 @@ in
"beta.dgnum.eu" = { "beta.dgnum.eu" = {
# provideXFR = [ ... ]; # provideXFR = [ ... ];
# notify = [ ... ]; # 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; });
}; };
}; };
}; };