cluster/services/dns: fix typo

This commit is contained in:
Max Headroom 2023-11-02 23:55:10 +01:00
parent d65fb75f78
commit e3b6d66991

View file

@ -20,7 +20,7 @@ let
rewriteRecords = lib.filterAttrs (_: record: record.rewrite.target != null) cluster.config.dns.records; rewriteRecords = lib.filterAttrs (_: record: record.rewrite.target != null) cluster.config.dns.records;
rewrites = lib.mapAttrsToList (_: record: let rewrites = lib.mapAttrsToList (_: record: let
maybeEscapeRegex = str: if record.write.type == "regex" then "^${lib.escapeRegex str}$" else str; maybeEscapeRegex = str: if record.rewrite.type == "regex" then "^${lib.escapeRegex str}$" else str;
in "rewrite stop name ${record.rewrite.type} ${record.name}${maybeEscapeRegex ".${record.root}."} ${record.rewrite.target}. answer auto") rewriteRecords; in "rewrite stop name ${record.rewrite.type} ${record.name}${maybeEscapeRegex ".${record.root}."} ${record.rewrite.target}. answer auto") rewriteRecords;
rewriteConf = pkgs.writeText "coredns-rewrites.conf" (lib.concatStringsSep "\n" rewrites); rewriteConf = pkgs.writeText "coredns-rewrites.conf" (lib.concatStringsSep "\n" rewrites);