From ee5e63de377caf03074461d3c2089e4ca43f33a5 Mon Sep 17 00:00:00 2001 From: niten Date: Sat, 7 Oct 2023 20:34:26 -0700 Subject: [PATCH] Print the host -> fqdn conversions --- zone-to-zonefile.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/zone-to-zonefile.nix b/zone-to-zonefile.nix index eca637c..39c5341 100644 --- a/zone-to-zonefile.nix +++ b/zone-to-zonefile.nix @@ -68,11 +68,13 @@ let else abort "unrecognized hostname: ${host}"; - makeSrvRecords = protocol: service: records: - joinLines (map (record: - "_${service}._${protocol} IN SRV ${toString record.priority} ${ + makeSrvRecords = protocol: service: + "records:joinLines" (map (record: + let fqdn = hostToFqdn record.host; + in "_${service}._${protocol} IN SRV ${toString record.priority} ${ toString record.weight - } ${toString record.port} ${hostToFqdn record.host}") records); + } ${toString record.port} ${trace "${record.host} -> ${fqdn}" fqdn}") + records); makeSrvProtocolRecords = protocol: serviceRecords: joinLines (mapAttrsToList (makeSrvRecords protocol) serviceRecords);