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:
2026-07-12 21:02:09 -03:00
parent 15fcf88da2
commit bab8bdecb7
+2 -8
View File
@@ -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