From c56afe36de0dc0b2a7b27f1e26539aa976b6c9ae Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Mon, 8 Aug 2022 18:47:12 +0800 Subject: [PATCH] lib: add `profiles` to module blocklist --- lib/private.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/private.nix b/lib/private.nix index c377d02f..27ad5a41 100644 --- a/lib/private.nix +++ b/lib/private.nix @@ -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); }