mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
lib: remove modulesToList
No part of the config uses this function anymore so it's safe to remove it.
This commit is contained in:
parent
1d1cb991ea
commit
a34fb65959
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user