lib.modules: compute disabled module list early

isDisabled gets the list of disabledModules ready when it's only given
two attributes, so when it's passed the third argument, it just has to
call `elem` on its precomputed list. This was being used in the graph
right below, but now in module filtering.
This commit is contained in:
Eman Resu
2026-05-07 20:01:16 -04:00
committed by Eman Resu
parent 4d3fcf13e7
commit d3bbd01933

View File

@@ -564,7 +564,8 @@ let
modulesPath:
{ disabled, modules }:
let
keyFilter = filter (attrs: !isDisabled modulesPath disabled attrs);
isDisabledModule = isDisabled modulesPath disabled;
keyFilter = filter (attrs: !isDisabledModule attrs);
in
catAttrs "module" (genericClosure {
startSet = keyFilter modules;