1
0
Fork 0
selfhostblocks/haproxy/config.nix

29 lines
432 B
Nix
Raw Normal View History

2022-09-14 08:47:49 +02:00
{ stdenv
, pkgs
, lib
, utils
}:
{ configDir ? "/etc/haproxy"
, configFile ? "haproxy.cfg"
, user
, group
, config
2022-09-14 08:47:49 +02:00
}:
dependsOn:
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 dependsOn // {inherit user group;}));
}