mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00
Check for undeclared options
This commit is contained in:
parent
c263b5b284
commit
f4a418761b
4 changed files with 35 additions and 26 deletions
|
@ -7,19 +7,21 @@
|
|||
, baseModules ? import ../modules/module-list.nix
|
||||
, extraArgs ? {}
|
||||
, modules
|
||||
, check ? true
|
||||
}:
|
||||
|
||||
let extraArgs_ = extraArgs; pkgs_ = pkgs; system_ = system; in
|
||||
|
||||
rec {
|
||||
|
||||
# These are the NixOS modules that constitute the system configuration.
|
||||
configComponents = modules ++ baseModules;
|
||||
|
||||
# Merge the option definitions in all modules, forming the full
|
||||
# system configuration. It's not checked for undeclared options.
|
||||
# system configuration.
|
||||
systemModule =
|
||||
pkgs.lib.evalModules configComponents extraArgs;
|
||||
pkgs.lib.evalModules {
|
||||
modules = modules ++ baseModules;
|
||||
args = extraArgs;
|
||||
inherit check;
|
||||
};
|
||||
|
||||
config = systemModule.config;
|
||||
|
||||
|
@ -54,6 +56,7 @@ rec {
|
|||
# define nixpkgs.config, so it's pointless to evaluate them.
|
||||
baseModules = [ ../modules/misc/nixpkgs.nix ];
|
||||
pkgs = import ./nixpkgs.nix { system = system_; config = {}; };
|
||||
check = false;
|
||||
}).config.nixpkgs;
|
||||
in
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue