nixpkgs/nixos/lib/make-options-doc
Robert Hensing d916df7775 nixos/make-options-doc: Remove now redundant fixup
This fixes a problem where most NixOS option declaration paths started
with `nixos/modules/nixos/modules/`, which should have been only
just `nixos/modules/`.

Since dcc0ee9ea1, we use a source path
that includes both the `modules` and `nixos/modules`, so we don't need
to additionally prefix `nixos/modules` anymore.

Manually checked with

    nix-build nixos/release.nix -A options
    jq < result/share/doc/nixos/options.json '[ ."_module.args".declarations, ."meta.maintainers".declarations, ."nixpkgs.system".declarations, ."zramSwap.swapDevices".declarations ]'

Samples:

- `_module` for options defined in `lib/`
- `meta.maintainers` for options defined in `modules/`
- `nixpkgs.system` for options defined in `nixos/` with `meta.buildDocsInSandbox = false;`
- `zramSwap.swapDevices` for regular `nixos/` without that

I'm a big fan of automated tests, but in this case I am not doing that because
- the solution is a simplification, and
- no obvious place for the test, and it would couple with unrelated
  downstream code more than I would like.
2025-09-14 16:15:09 +02:00
..
default.nix Doc/nixosOptionsDoc: fix baseModules cannot be empty 2025-08-02 14:10:58 +02:00
mergeJSON.py nixos/make-options-doc: Remove now redundant fixup 2025-09-14 16:15:09 +02:00
tests.nix