cluster/services/dns: create dns records for machines
This commit is contained in:
parent
2a9fdfa4f9
commit
a09b8ff7c5
2 changed files with 12 additions and 0 deletions
|
@ -7,6 +7,7 @@ in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./options.nix
|
./options.nix
|
||||||
|
./nodes.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
links = {
|
links = {
|
||||||
|
|
11
cluster/services/dns/nodes.nix
Normal file
11
cluster/services/dns/nodes.nix
Normal file
|
@ -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;
|
||||||
|
}
|
Loading…
Reference in a new issue