Print the host -> fqdn conversions

This commit is contained in:
niten 2023-10-07 20:34:26 -07:00
parent 12cf9bfeee
commit ee5e63de37
1 changed files with 6 additions and 4 deletions

View File

@ -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);