1
0
Fork 0
selfhostblocks/haproxy/config.nix

26 lines
369 B
Nix
Raw Normal View History

2022-09-14 08:47:49 +02:00
{ stdenv
, pkgs
, lib
, utils
}:
{ configDir ? "/etc/haproxy"
, configFile ? "haproxy.cfg"
, config
2022-09-14 08:47:49 +02:00
}:
2022-10-26 07:02:51 +02:00
with builtins;
with lib.attrsets;
with lib.lists;
2022-10-26 07:02:51 +02:00
with lib.strings;
2022-09-14 08:47:49 +02:00
let
configcreator = pkgs.callPackage ./configcreator.nix {};
2022-09-14 08:47:49 +02:00
in
utils.mkConfigFile {
name = configFile;
dir = configDir;
content = configcreator.render (configcreator.default config);
}