Simplify modulesTree definition
- Streamlined the construction of modulesTree by consolidating filter logic into a single line for improved readability and maintainability.
This commit is contained in:
@@ -212,15 +212,9 @@
|
||||
# https://import-tree.oeiuwq.com/guides/filtering/ ). filterNot composes AND with that.
|
||||
# Skip /package/ and /packages/ (callPackage colocation).
|
||||
# Avoid a global "/home-manager/" filter — it would drop modules/ssh/home-manager/.
|
||||
modulesTree =
|
||||
lib.pipe inputs.import-tree [
|
||||
modulesTree = lib.pipe inputs.import-tree [
|
||||
(it: it.withLib lib)
|
||||
(it:
|
||||
it.filterNot (
|
||||
p:
|
||||
lib.hasInfix "/package/" p
|
||||
|| lib.hasInfix "/packages/" p
|
||||
))
|
||||
(it: it.filterNot (p: lib.hasInfix "/package/" p || lib.hasInfix "/packages/" p))
|
||||
(it: it ./modules)
|
||||
];
|
||||
in
|
||||
|
||||
Reference in New Issue
Block a user