diff --git a/system/options.nix b/system/options.nix index bf571d56635d..ab39d15857c1 100644 --- a/system/options.nix +++ b/system/options.nix @@ -1872,6 +1872,13 @@ root ALL=(ALL) SETENV: ALL "; }; + checkConfigurationOptions = mkOption { + default = false; + example = true; + description = " + If all configuration options must be checked. Non-existing options fail build. + "; + }; }; nesting = { diff --git a/system/system.nix b/system/system.nix index 21e8c06a8bea..8978473c872a 100644 --- a/system/system.nix +++ b/system/system.nix @@ -369,6 +369,8 @@ rec { configuration = x//{boot=((x.boot)//{grubDevice = "";});};}).system) config.nesting.children; configurationName = config.boot.configurationName; - }) (pkgs.getConfig ["checkConfigurationOptions"] false) - optionDeclarations configuration ; + }) (pkgs.lib.getAttr ["environment" "checkConfigurationOptions"] + optionDeclarations.environment.checkConfigurationOptions.default + configuration) + optionDeclarations configuration ; }