lib/modules: Fix store imports
This fixes imports from the store not being possible, which was caused by https://github.com/NixOS/nixpkgs/pull/76857 E.g. such a case: imports = [ "${home-manager}/nixos" ];
This commit is contained in:
parent
e116b4b331
commit
e0ea5f4d9b
@ -151,8 +151,8 @@ rec {
|
|||||||
filterModules = modulesPath: { disabled, modules }:
|
filterModules = modulesPath: { disabled, modules }:
|
||||||
let
|
let
|
||||||
moduleKey = m: if isString m then toString modulesPath + "/" + m else toString m;
|
moduleKey = m: if isString m then toString modulesPath + "/" + m else toString m;
|
||||||
disabledKeys = listToAttrs (map (k: nameValuePair (moduleKey k) null) disabled);
|
disabledKeys = map moduleKey disabled;
|
||||||
keyFilter = filter (attrs: ! disabledKeys ? ${attrs.key});
|
keyFilter = filter (attrs: ! elem attrs.key disabledKeys);
|
||||||
in map (attrs: attrs.module) (builtins.genericClosure {
|
in map (attrs: attrs.module) (builtins.genericClosure {
|
||||||
startSet = keyFilter modules;
|
startSet = keyFilter modules;
|
||||||
operator = attrs: keyFilter attrs.modules;
|
operator = attrs: keyFilter attrs.modules;
|
||||||
|
Loading…
Reference in New Issue
Block a user