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.
7 lines
247 B
Nix
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);
|
|
}
|
|
)
|