diff --git a/zone-to-zonefile.nix b/zone-to-zonefile.nix index 67c8048..eca637c 100644 --- a/zone-to-zonefile.nix +++ b/zone-to-zonefile.nix @@ -58,7 +58,7 @@ let hostToFqdn = host: let hostChars = "[a-zA-Z0-9_-]"; - in if (hasAttr host zone.hosts) then + in if isNotNull (builtins.match "^${hostChars}+$") then "${host}.${domain}." else if isNotNull (builtins.match "${hostChars}+\\.$" host) then host