lib: ensure path type in mkProfileAttrs

This is required so that filtering via lib.remove works against 
modules.core and similar which are of path type.

It is also a prerequisite for disabledModules to match by module.key
instead of path string relative to nixpkgs' modulePath.
This commit is contained in:
David Arnold 2021-03-18 20:58:55 -05:00 committed by "David Arnold"
parent 2961c1ea52
commit db716d1921
No known key found for this signature in database
GPG key ID: 6D6A936E69C59D08

View file

@ -27,7 +27,7 @@ let mkProfileAttrs =
f = n: _:
lib.optionalAttrs
(lib.pathExists "${dir}/${n}/default.nix")
{ default = "${dir}/${n}"; }
{ default = /. + "${dir}/${n}"; }
// mkProfileAttrs "${dir}/${n}";
in
lib.mapAttrs f imports;