diff options
author | Silvan Mosberger <contact@infinisil.com> | 2020-01-10 04:00:33 +0100 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2020-01-10 04:13:28 +0100 |
commit | e0ea5f4d9ba5d8553fcadde487b57e6dbd1ff746 (patch) | |
tree | 0b7ff8657335356703c473e59d0e30617b228e98 /lib/modules.nix | |
parent | e116b4b331b855653be114b7a26e4a20fdc95b3e (diff) | |
download | nixpkgs-e0ea5f4d9ba5d8553fcadde487b57e6dbd1ff746.tar nixpkgs-e0ea5f4d9ba5d8553fcadde487b57e6dbd1ff746.tar.gz nixpkgs-e0ea5f4d9ba5d8553fcadde487b57e6dbd1ff746.tar.bz2 nixpkgs-e0ea5f4d9ba5d8553fcadde487b57e6dbd1ff746.tar.lz nixpkgs-e0ea5f4d9ba5d8553fcadde487b57e6dbd1ff746.tar.xz nixpkgs-e0ea5f4d9ba5d8553fcadde487b57e6dbd1ff746.tar.zst nixpkgs-e0ea5f4d9ba5d8553fcadde487b57e6dbd1ff746.zip |
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" ];
Diffstat (limited to 'lib/modules.nix')
-rw-r--r-- | lib/modules.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/modules.nix b/lib/modules.nix index 38d6ac8cd91..559697b3d57 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; |