From b24f73bc4b6cdab45ecda48a8ca0c3af4ed72481 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 3 Dec 2023 23:04:15 +0100 Subject: [PATCH] cluster/services/idm: add dns records --- cluster/services/idm/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/cluster/services/idm/default.nix b/cluster/services/idm/default.nix index c8a5b80..279316d 100644 --- a/cluster/services/idm/default.nix +++ b/cluster/services/idm/default.nix @@ -34,4 +34,22 @@ ]; }; }; + + dns.records = let + serverAddrsPublic = map + (node: depot.hours.${node}.interfaces.primary.addrPublic) + config.services.idm.nodes.server; + serverAddrsInternal = map + (node: config.vars.mesh.${node}.meshIp) + config.services.idm.nodes.server; + in { + idm = { + type = "A"; + target = serverAddrsPublic; + }; + "idm-ldap.internal" = { + type = "A"; + target = serverAddrsInternal; + }; + }; }