lib: add profiles to module blocklist

This commit is contained in:
Gabriel Arazas 2022-08-08 18:47:12 +08:00
parent 0126b4e1e7
commit c56afe36de

View File

@ -47,13 +47,17 @@ rec {
lib.getAttr user (getUsers type [ user ]);
# Import modules with a set blocklist.
importModules = let
importModules = attrs: let
blocklist = [
# The modules under this attribute are often incomplete and needing
# very specific requirements that is 99% going to be absent from the
# outside so we're not going to export it.
"tasks"
# Profiles are often specific to this project so there's not much point
# in exporting these.
"profiles"
];
in attrs:
in
lib.filterAttrs (n: v: !lib.elem n blocklist) (lib.mapAttrsRecursive (_: path: import path) attrs);
}