diff --git a/haproxy/config.nix b/haproxy/config.nix index 118ee4d..79a2497 100644 --- a/haproxy/config.nix +++ b/haproxy/config.nix @@ -18,11 +18,13 @@ , prometheusStatsUri ? null }: +with builtins; +with lib.strings; let stats = if statsEnable then "" else '' frontend stats - bind localhost:${builtins.toString statsPort} + bind localhost:${toString statsPort} mode http stats enable # stats hide-version @@ -33,12 +35,12 @@ let ''); indent = spaces: content: - lib.strings.concatMapStrings + concatMapStrings (x: spaces + x + "\n") - (lib.strings.splitString "\n" content); + (splitString "\n" content); - frontends_str = lib.strings.concatMapStrings (acl: indent " " acl) frontends; - backends_str = builtins.concatStringsSep "\n" backends; + frontends_str = concatMapStrings (acl: indent " " acl) frontends; + backends_str = concatStringsSep "\n" backends; in