diff --git a/haproxy/config.nix b/haproxy/config.nix index 209a91f..880adc7 100644 --- a/haproxy/config.nix +++ b/haproxy/config.nix @@ -17,7 +17,7 @@ with lib.lists; with lib.strings; let - configcreator = pkgs.callPackage ./configcreator.nix {}; + configcreator = pkgs.callPackage ./configcreator.nix {inherit utils;}; in diff --git a/haproxy/configcreator.nix b/haproxy/configcreator.nix index 7c90d3d..5fca7e8 100644 --- a/haproxy/configcreator.nix +++ b/haproxy/configcreator.nix @@ -1,5 +1,6 @@ { lib , pkgs +, utils }: with builtins; @@ -7,6 +8,7 @@ with lib; with lib.attrsets; with lib.lists; with lib.strings; +with utils; let getAttrWithDefault = name: default: attrset: if isAttrs attrset && hasAttr name attrset then @@ -283,18 +285,6 @@ let concatStringsRecursive = sep: strings: concatStringsSep sep (flatten strings); - recursiveMerge = attrList: - let f = attrPath: - zipAttrsWith (n: values: - if all isList values then - concatLists values - else if all isAttrs values then - f (attrPath ++ [n]) values - else - last values - ); - in f [] attrList; - assertHasAttr = name: attrPath: v: assertMsg (hasAttrByPath attrPath v)