lib: remove modulesToList

No part of the config uses this function anymore so it's safe to remove it.
This commit is contained in:
Gabriel Arazas 2023-12-18 18:05:16 +08:00
parent 1d1cb991ea
commit a34fb65959
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -45,23 +45,6 @@ rec {
lib.filterAttrs (name: value: value != { })
(lib.mapAttrs' collect files);
/* Collect all modules (results from `filesToAttr`) into a list.
Signature:
attrs -> [ function ]
Where:
- `attrs` is the set of modules and their path.
Returns:
- A list of imported modules.
Example:
modulesToList (filesToAttr ../modules)
=> [ <lambda> <lambda> <lambda> ]
*/
modulesToList = attrs:
let paths = lib.collect builtins.isPath attrs;
in builtins.map (path: import path) paths;
/* Count the attributes with the given predicate.
Examples: