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

28 lines
446 B
Nix

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