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.
This commit is contained in:
parent
65dc0e36e4
commit
ed97f22ac0
2 changed files with 18 additions and 16 deletions
|
@ -2,5 +2,6 @@
|
|||
lib.makeExtensible (self:
|
||||
{
|
||||
flattenListSet = imports: (lib.lists.flatten (builtins.concatLists (builtins.attrValues imports)));
|
||||
flattenSetList = attrSet: (builtins.mapAttrs (name: value: lib.lists.flatten value) attrSet);
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue