From 5ea06758810d6abd3c17b73a064cb72ac7a69c20 Mon Sep 17 00:00:00 2001 From: hiroqn <909385+hiroqn@users.noreply.github.com> Date: Sat, 13 Jan 2024 17:01:25 +0900 Subject: [PATCH] expose extendModules --- eval-config.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/eval-config.nix b/eval-config.nix index cd14493d0..a98af1e26 100644 --- a/eval-config.nix +++ b/eval-config.nix @@ -20,12 +20,12 @@ let modules = modules ++ [ argsModule ] ++ baseModules; specialArgs = { modulesPath = builtins.toString ./modules; } // specialArgs; }); -in - -{ - inherit (eval._module.args) pkgs; - inherit (eval) options config; - inherit (eval) _module; - - system = eval.config.system.build.toplevel; -} + + withExtraAttrs = module: + { + inherit (module._module.args) pkgs; + inherit (module) options config _module; + system = module.config.system.build.toplevel; + extendModules = args: withExtraAttrs (module.extendModules args); + }; +in withExtraAttrs eval