1
0
Fork 0
selfhostblocks/haproxy/config.nix
2023-02-19 20:37:52 -08:00

25 lines
369 B
Nix

{ stdenv
, pkgs
, lib
, utils
}:
{ configDir ? "/etc/haproxy"
, configFile ? "haproxy.cfg"
, config
}:
with builtins;
with lib.attrsets;
with lib.lists;
with lib.strings;
let
configcreator = pkgs.callPackage ./configcreator.nix {};
in
utils.mkConfigFile {
name = configFile;
dir = configDir;
content = configcreator.render (configcreator.default config);
}