universe/lib/default.nix
Infinidoge ed97f22ac0 feat: add flattenSetList
Using the function reduces continual use of lib.lists.flatten, by
applying it to each of the attributes of a set, assuming they contain lists.
2022-04-29 10:27:44 -04:00

7 lines
247 B
Nix

{ lib }:
lib.makeExtensible (self:
{
flattenListSet = imports: (lib.lists.flatten (builtins.concatLists (builtins.attrValues imports)));
flattenSetList = attrSet: (builtins.mapAttrs (name: value: lib.lists.flatten value) attrSet);
}
)