1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

expose extendModules

This commit is contained in:
hiroqn 2024-01-13 17:01:25 +09:00
parent c8d3157d1f
commit 5ea0675881

View file

@ -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