1
0
Fork 0
selfhostblocks/haproxy/config.nix

29 lines
446 B
Nix
Raw Normal View History

2022-09-13 23:47:49 -07:00
{ stdenv
, pkgs
, lib
, utils
}:
{ configDir ? "/etc/haproxy"
, configFile ? "haproxy.cfg"
, user
, group
, config
2022-09-13 23:47:49 -07:00
}:
dependsOn:
2022-09-13 23:47:49 -07:00
2022-10-25 22:02:51 -07:00
with builtins;
with lib.attrsets;
with lib.lists;
2022-10-25 22:02:51 -07:00
with lib.strings;
2022-09-13 23:47:49 -07:00
let
2022-12-30 01:47:08 -08:00
configcreator = pkgs.callPackage ./configcreator.nix {inherit utils;};
2022-09-13 23:47:49 -07:00
in
utils.mkConfigFile {
name = configFile;
dir = configDir;
content = configcreator.render (configcreator.default (config dependsOn // {inherit user group;}));
}