From bab8bdecb7c51154c937702b274eec286c490cb5 Mon Sep 17 00:00:00 2001 From: OlivierChiasson Date: Sun, 12 Jul 2026 21:02:09 -0300 Subject: [PATCH] Simplify modulesTree definition - Streamlined the construction of modulesTree by consolidating filter logic into a single line for improved readability and maintainability. --- flake.nix | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index 27d9097..a9fc3a0 100644 --- a/flake.nix +++ b/flake.nix @@ -212,17 +212,11 @@ # 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 [ - (it: it.withLib lib) - (it: - it.filterNot ( - p: - lib.hasInfix "/package/" p - || lib.hasInfix "/packages/" p - )) - (it: it ./modules) - ]; + modulesTree = lib.pipe inputs.import-tree [ + (it: it.withLib lib) + (it: it.filterNot (p: lib.hasInfix "/package/" p || lib.hasInfix "/packages/" p)) + (it: it ./modules) + ]; in inputs.flake-parts.lib.mkFlake { inherit inputs; } modulesTree; }