From e0ea5f4d9ba5d8553fcadde487b57e6dbd1ff746 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Fri, 10 Jan 2020 04:00:33 +0100 Subject: [PATCH] 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" ]; --- lib/modules.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/modules.nix b/lib/modules.nix index 38d6ac8cd916..559697b3d57e 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -151,8 +151,8 @@ rec { filterModules = modulesPath: { disabled, modules }: let moduleKey = m: if isString m then toString modulesPath + "/" + m else toString m; - disabledKeys = listToAttrs (map (k: nameValuePair (moduleKey k) null) disabled); - keyFilter = filter (attrs: ! disabledKeys ? ${attrs.key}); + disabledKeys = map moduleKey disabled; + keyFilter = filter (attrs: ! elem attrs.key disabledKeys); in map (attrs: attrs.module) (builtins.genericClosure { startSet = keyFilter modules; operator = attrs: keyFilter attrs.modules;