Consumers that supply their own portable service base -- a pinned
`service.nix` from a different nixpkgs, for example -- had no way to
replace the module that `configure` loads. Add a `baseModules`
parameter for that. It defaults to the portable service base, so
callers that only set `serviceManagerPkgs` are unaffected.
Assisted-by: Claude:claude-opus-5
Claude-Session: https://claude.ai/code/session_01DPPuohWjgbww5Rq8faiP57
Followup to #506519. Adds `lib.services` so consumers can reference the
portable service infrastructure directly instead of using fragile
relative path imports.
Expand the doc comment with a structured description, type signature,
properly formatted parameter docs, and an example showing how to
implement modular services for a new containing system.
Move the portable modular service base from
nixos/modules/system/service/portable/ to lib/services/, making it
importable by any module system (home-manager, nix-darwin) without
reaching into the nixos/ tree.
Moved files: service.nix, lib.nix, config-data.nix, config-data-item.nix,
test.nix. All external references updated (systemd/system.nix,
doc/manual/default.nix, assertions.nix, README.md).
No functional changes - only import paths differ.