diff --git a/checks/options-doc.nix b/checks/options-doc.nix new file mode 100644 index 0000000..a15f128 --- /dev/null +++ b/checks/options-doc.nix @@ -0,0 +1,21 @@ +{ system +, inputs +, ... +}: + +let + eval = inputs.nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + inputs.self.nixosModules.wsl + { + # This forces evaluation of all types/descriptions in all modules + documentation.nixos.includeAllModules = true; + } + ]; + }; +in +# Return the options JSON derivation. + # If any option type has a circular reference or missing attribute, + # evaluation will fail here. +eval.config.system.build.manual.optionsJSON diff --git a/flake.nix b/flake.nix index 06d7dd0..a48a081 100644 --- a/flake.nix +++ b/flake.nix @@ -77,6 +77,7 @@ { nixpkgs-fmt = pkgs.callPackage ./checks/nixpkgs-fmt.nix args; nixpkgs-input = pkgs.callPackage ./checks/nixpkgs-input.nix args; + options-doc = pkgs.callPackage ./checks/options-doc.nix args; rustfmt = pkgs.callPackage ./checks/rustfmt.nix args; side-effects = pkgs.callPackage ./checks/side-effects.nix args; username = pkgs.callPackage ./checks/username.nix args;