Properly escape periods

This commit is contained in:
niten 2023-10-07 09:15:42 -07:00
parent f31a63396b
commit b46fdaa9aa
1 changed files with 2 additions and 2 deletions

View File

@ -57,9 +57,9 @@ let
isNotNull = o: !isNull o; isNotNull = o: !isNull o;
hostToFqdn = host: hostToFqdn = host:
if isNotNull (builtins.match ".+.$" host) then if isNotNull (builtins.match ".+\\.$" host) then
host host
else if isNotNull (builtins.match ".+..+$" host) then else if isNotNull (builtins.match ".+\\..+$" host) then
"${host}." "${host}."
else if (hasAttr host zone.hosts) then else if (hasAttr host zone.hosts) then
"${host}.${domain}." "${host}.${domain}."