diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-04-10 17:55:34 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-05-06 18:29:04 +0200 |
commit | 79703eef083d70046873dbb86f08e2ff08f58197 (patch) | |
tree | 262d6370ef51132a9c08fa71d4ce1dba71b6a770 /doc/doc-support | |
parent | 84b1b017026bb1d0a37a8d3ef553f073225b4e8d (diff) | |
download | nixpkgs-79703eef083d70046873dbb86f08e2ff08f58197.tar nixpkgs-79703eef083d70046873dbb86f08e2ff08f58197.tar.gz nixpkgs-79703eef083d70046873dbb86f08e2ff08f58197.tar.bz2 nixpkgs-79703eef083d70046873dbb86f08e2ff08f58197.tar.lz nixpkgs-79703eef083d70046873dbb86f08e2ff08f58197.tar.xz nixpkgs-79703eef083d70046873dbb86f08e2ff08f58197.tar.zst nixpkgs-79703eef083d70046873dbb86f08e2ff08f58197.zip |
nixos,nixpkgs: Add module classes
This allows modules that declare their class to be checked. While that's not most user modules, frameworks can take advantage of this by setting declaring the module class for their users. That way, the mistake of importing a module into the wrong hierarchy can be reported more clearly in some cases.
Diffstat (limited to 'doc/doc-support')
-rw-r--r-- | doc/doc-support/default.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/doc-support/default.nix b/doc/doc-support/default.nix index bea3e12a70b..67195a4a58b 100644 --- a/doc/doc-support/default.nix +++ b/doc/doc-support/default.nix @@ -45,7 +45,10 @@ let # NB: This file describes the Nixpkgs manual, which happens to use module # docs infra originally developed for NixOS. optionsDoc = pkgs.nixosOptionsDoc { - inherit (pkgs.lib.evalModules { modules = [ ../../pkgs/top-level/config.nix ]; }) options; + inherit (pkgs.lib.evalModules { + modules = [ ../../pkgs/top-level/config.nix ]; + specialArgs.class = "nixpkgsConfig"; + }) options; documentType = "none"; transformOptions = opt: opt // { |