diff --git a/doc/module-system/module-system.chapter.md b/doc/module-system/module-system.chapter.md index b82a546e4aa6..927f66073748 100644 --- a/doc/module-system/module-system.chapter.md +++ b/doc/module-system/module-system.chapter.md @@ -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). diff --git a/lib/modules.nix b/lib/modules.nix index 5e7f5d7a86d4..4dc8c663b2fe 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -326,7 +326,7 @@ let config = checked (removeAttrs config [ "_module" ]); _module = checked (config._module); inherit extendModules type; - configurationClass = class; + class = class; }; in result; diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 0aac5b946a3b..45c247cbbea6 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -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