`.` isn't liberal enough

This commit is contained in:
niten 2023-10-07 09:40:31 -07:00
parent b46fdaa9aa
commit 28af343752
1 changed files with 2 additions and 2 deletions

View File

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