From b46fdaa9aac04df71e2c3308c056a204aad00d3c Mon Sep 17 00:00:00 2001 From: niten Date: Sat, 7 Oct 2023 09:15:42 -0700 Subject: [PATCH] Properly escape periods --- zone-to-zonefile.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone-to-zonefile.nix b/zone-to-zonefile.nix index 069d2b7..35cdd4a 100644 --- a/zone-to-zonefile.nix +++ b/zone-to-zonefile.nix @@ -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}."