services specialArg stage 1

This commit is contained in:
kat witch 2021-08-06 23:11:46 +01:00
parent aef9c37ee6
commit 3c9475cdcf
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
30 changed files with 14 additions and 103 deletions

View file

@ -12,5 +12,6 @@
{
inherit (colorHelpers) hextorgba;
hostImport = import ./host-import.nix { inherit lib; };
modListMerge = import ./intersect-merge.nix { inherit lib; };
modList = import ./module-list.nix { inherit lib; };
}; in katlib

View file

@ -0,0 +1,4 @@
{ lib }: pathsA: pathsB: with lib; let
pathIntersection = intersectLists (attrNames pathsA) (attrNames pathsB);
pathMerger = pathA: pathB: { imports = [ pathA pathB ]; };
in pathsA // pathsB // genAttrs pathIntersection (key: (pathMerger pathsA.${key} pathsB.${key}))