diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-04-17 19:48:53 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-05-06 18:32:58 +0200 |
commit | 8054785157119ea12e526481924d6676427904bb (patch) | |
tree | d62be0513289427454c94acc1ef86444249c21f8 /doc | |
parent | 8f02e95aff2b9cb94470ec379e2a3f55858cb03d (diff) |
lib/modules: Move class out of specialArgs
Diffstat (limited to 'doc')
-rw-r--r-- | doc/doc-support/default.nix | 2 | ||||
-rw-r--r-- | doc/module-system/module-system.chapter.md | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/doc-support/default.nix b/doc/doc-support/default.nix index 67195a4a58b04..cfa7cbdc82839 100644 --- a/doc/doc-support/default.nix +++ b/doc/doc-support/default.nix @@ -47,7 +47,7 @@ let optionsDoc = pkgs.nixosOptionsDoc { inherit (pkgs.lib.evalModules { modules = [ ../../pkgs/top-level/config.nix ]; - specialArgs.class = "nixpkgsConfig"; + class = "nixpkgsConfig"; }) options; documentType = "none"; transformOptions = opt: diff --git a/doc/module-system/module-system.chapter.md b/doc/module-system/module-system.chapter.md index 9a24ab70c6c17..51e600d756405 100644 --- a/doc/module-system/module-system.chapter.md +++ b/doc/module-system/module-system.chapter.md @@ -28,11 +28,11 @@ An attribute set of module arguments that can be used in `imports`. This is in contrast to `config._module.args`, which is only available after all `imports` have been resolved. -#### `specialArgs.class` {#module-system-lib-evalModules-param-specialArgs-class} +#### `class` {#module-system-lib-evalModules-param-class} -If the `class` attribute is set in `specialArgs`, the module system will reject modules with a different `class`. +If the `class` attribute is set and non-`null`, the module system will reject `imports` with a different `class`. -The `class` value should be in lower [camel case](https://en.wikipedia.org/wiki/Camel_case). +The `class` value should be a string in lower [camel case](https://en.wikipedia.org/wiki/Camel_case). If applicable, the `class` should match the "prefix" of the attributes used in (experimental) [flakes](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#description). Some examples are: |