From ba6e0fcc640c78f9112f7985e8153618a67ffded Mon Sep 17 00:00:00 2001 From: niten Date: Sat, 18 Nov 2023 11:49:29 -0800 Subject: [PATCH] Allow fqdn --- zone-to-zonefile.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zone-to-zonefile.nix b/zone-to-zonefile.nix index fa06b69..e5b593a 100644 --- a/zone-to-zonefile.nix +++ b/zone-to-zonefile.nix @@ -60,7 +60,8 @@ let let hostChars = "[a-zA-Z0-9_-]"; in if isNotNull (builtins.match "^${hostChars}+$" host) then "${host}.${domain}." - else if isNotNull (builtins.match "${hostChars}+\\.$" host) then + else if isNotNull + (builtins.match "(${hostChars}+\\.)+${hostChars}+\\.$" host) then host else if isNotNull (builtins.match "(${hostChars}+\\.)+${hostChars}+$" host) then