mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-15 17:51:01 +00:00
3d65d13974
Co-authored-by: Michael Hoang <Enzime@users.noreply.github.com>
30 lines
618 B
Nix
30 lines
618 B
Nix
{ lib
|
|
, modules
|
|
, baseModules ? import ./modules/module-list.nix
|
|
, specialArgs ? { }
|
|
, check ? true
|
|
}@args:
|
|
|
|
let
|
|
argsModule = {
|
|
_file = ./eval-config.nix;
|
|
config = {
|
|
_module.args = {
|
|
inherit baseModules modules;
|
|
};
|
|
};
|
|
};
|
|
|
|
eval = lib.evalModules (builtins.removeAttrs args [ "lib" ] // {
|
|
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;
|
|
}
|