diff --git a/cluster/services/dns/default.nix b/cluster/services/dns/default.nix index f6b3419..5f3226f 100644 --- a/cluster/services/dns/default.nix +++ b/cluster/services/dns/default.nix @@ -7,6 +7,7 @@ in { imports = [ ./options.nix + ./nodes.nix ]; links = { diff --git a/cluster/services/dns/nodes.nix b/cluster/services/dns/nodes.nix new file mode 100644 index 0000000..c825837 --- /dev/null +++ b/cluster/services/dns/nodes.nix @@ -0,0 +1,11 @@ +{ depot, lib, ... }: + +{ + dns.records = lib.mapAttrs' (name: hour: { + name = lib.toLower "${name}.${hour.enterprise.subdomain}"; + value = { + type = "A"; + target = [ hour.interfaces.primary.addrPublic ]; + }; + }) depot.gods.fromLight; +}