lib.modules: configurationClass -> class

This simplifies the documentation. `configuration` is implied by `_type`.
This commit is contained in:
Robert Hensing 2023-04-27 20:03:44 +02:00
parent 89491bef8d
commit eab660d91e
3 changed files with 4 additions and 4 deletions

View File

@ -100,6 +100,6 @@ A portion of the configuration tree which is elided from `config`.
A nominal type marker, always `"configuration"`.
#### `configurationClass` {#module-system-lib-evalModules-return-value-_configurationClass}
#### `class` {#module-system-lib-evalModules-return-value-_configurationClass}
Equal to the [`class` parameter](#module-system-lib-evalModules-param-class).
The [`class` argument](#module-system-lib-evalModules-param-class).

View File

@ -326,7 +326,7 @@ let
config = checked (removeAttrs config [ "_module" ]);
_module = checked (config._module);
inherit extendModules type;
configurationClass = class;
class = class;
};
in result;

View File

@ -364,7 +364,7 @@ checkConfigOutput '^1$' config.sub.specialisation.value ./extendModules-168767-i
# Class checks, evalModules
checkConfigOutput '^{ }$' config.ok.config ./class-check.nix
checkConfigOutput '"nixos"' config.ok.configurationClass ./class-check.nix
checkConfigOutput '"nixos"' config.ok.class ./class-check.nix
checkConfigError 'The module .*/module-class-is-darwin.nix was imported into nixos instead of darwin.' config.fail.config ./class-check.nix
checkConfigError 'The module foo.nix#darwinModules.default was imported into nixos instead of darwin.' config.fail-anon.config ./class-check.nix