Remove unnecessary refs to hostData

This commit is contained in:
niten 2023-11-02 10:09:57 -07:00
parent b8e6881d4d
commit c35fdd8777
1 changed files with 6 additions and 6 deletions

View File

@ -84,12 +84,12 @@ let
{ ipv4-address, ipv6-address, sshfp-records, description, ... }: { ipv4-address, ipv6-address, sshfp-records, description, ... }:
let let
sshfpRecords = map (sshfp: "${hostname} IN SSHFP ${sshfp}") sshfp-records; sshfpRecords = map (sshfp: "${hostname} IN SSHFP ${sshfp}") sshfp-records;
aRecord = optional (hostData.ipv4-address != null) aRecord =
"${hostname} IN A ${ipv4-address}"; optional (ipv4-address != null) "${hostname} IN A ${ipv4-address}";
aaaaRecord = optional (hostData.ipv6-address != null) aaaaRecord =
"${hostname} IN AAAA ${ipv6-address}"; optional (ipv6-address != null) "${hostname} IN AAAA ${ipv6-address}";
descriptionRecord = optional (hostData.description != null) descriptionRecord =
''${hostname} IN TXT "${description}"''; optional (description != null) ''${hostname} IN TXT "${description}"'';
in aRecord ++ aaaaRecord ++ sshfpRecords ++ descriptionRecord; in aRecord ++ aaaaRecord ++ sshfpRecords ++ descriptionRecord;
cnameRecord = alias: host: "${alias} IN CNAME ${host}"; cnameRecord = alias: host: "${alias} IN CNAME ${host}";