trust-dns: hack to substitute ANATIVE before anything else
This commit is contained in:
parent
50353280d3
commit
39a39e763d
|
@ -96,7 +96,13 @@ let
|
|||
} // extraConfig
|
||||
);
|
||||
configPath = "/var/lib/trust-dns/${flavor}-config.toml";
|
||||
sedArgs = lib.mapAttrsToList (key: value: ''-e "s/${key}/${value}/g"'') substitutions;
|
||||
sedArgs = builtins.map (key: ''-e "s/${key}/${substitutions."${key}"}/g"'') (
|
||||
# HACK: %ANATIVE% often expands to one of the other subtitutions (e.g. %AWAN%)
|
||||
# so we must expand it *first*.
|
||||
lib.sortOn
|
||||
(k: if k == "%ANATIVE%" then 0 else 1)
|
||||
(builtins.attrNames substitutions)
|
||||
);
|
||||
subs = lib.concatStringsSep " " sedArgs;
|
||||
in {
|
||||
description = "trust-dns Domain Name Server (serving ${flavor})";
|
||||
|
|
Loading…
Reference in New Issue
Block a user