Files
nixpkgs/modules
cinereal aca42ac26a lib/services: make the portable service module self-contained
`lib/services/service.nix` reached outside of `lib/` for two class-agnostic
module fragments: `modules/generic/meta-maintainers.nix` and
`nixos/modules/misc/assertions.nix`. That prevents `lib/` from being used as a
standalone tree, which is exactly how `nixos/modules/misc/documentation.nix`
consumes it when building `lazy-options.json`.

Host both fragments in `lib/` and expose them as `lib.genericModules`, so that
consumers outside `lib/` reach them through the `lib` module argument instead of
a filesystem-relative import. The old locations become re-exports, keeping
`modules/generic/meta-maintainers.nix` importable as documented in
`modules/README.md` and `nixos/modules/misc/assertions.nix` usable from
`nixos/modules/module-list.nix`.

`lib` now shares the `filteredModules` tree in `documentation.nix`, so that
`declarations` pointing into it are stripped like the ones pointing into
`modules` and `nixos`, rather than leaving a disallowed store path reference in
`lazy-options.json`.

Assisted-by: Claude:claude-opus-5
2026-08-30 21:18:31 +02:00
..
2025-08-10 14:08:04 +02:00

<nixpkgs>/modules

This directory hosts subdirectories representing each module class for which the nixpkgs repository has user-importable modules.

Exceptions:

  • _class = "nixos"; modules go in the <nixpkgs>/nixos/modules tree
  • modules whose only purpose is to test code in this repository

The emphasis is on importable modules, i.e. ones that aren't inherent to and built into the Module System application.