2.home-manager/docs/release-notes
cinereal fb6a0c6d39 modules: add modular services support
Adds `home.services`, an attribute set of nixpkgs
[modular services](https://nixos.org/manual/nixos/unstable/#modular-services)
sourced from `<nixpkgs/lib/services/lib.nix>`. Each service exposes
`process.argv` and the upstream NixOS-style systemd schema
(`systemd.lib`, `systemd.mainExecStart`, `systemd.service`,
`systemd.services`, `systemd.sockets`) by re-exporting
`nixos/modules/system/service/systemd/service.nix`. Service modules
shipped with `_class = "service"` (e.g.
`pkgs.<name>.passthru.services.default`) drop in unchanged --
service portability across module systems is the point of modular
services.

Lifted units are evaluated and translated from NixOS-style attrs
(`wantedBy`, `serviceConfig`, `unitConfig`, `environment`, ...) into
the section-based INI shape (`{ Unit; Service; Install; }`) that
home-manager's `systemd.user.{services,sockets}` consumes; only the
common keys are mapped, uncommon options remain reachable via
`unitConfig` / `serviceConfig` / `socketConfig`. Sub-services and
their units are dashed under the parent service name;
`process.argv` becomes the default `ExecStart` for the service's
primary unit, which defaults to `WantedBy=default.target`.

Mirrors the surface of nixpkgs' portable systemd module (services +
sockets only); other unit kinds home-manager supports natively
(timers etc.) are intentionally not modeled until upstream grows
them.

Each service's `configData.<name>` entries are materialized at
`$XDG_CONFIG_HOME/system-services/<service-prefix>/<name>` (mirroring
how `nixos/modules/system/service/systemd/{config-data-path,system}.nix`
lifts `configData` to `environment.etc`), with the absolute path
injected back into `configData.<name>.path` so the service can refer
to its files at a stable location.

Includes nmt tests covering: a basic `process.argv`-only service, a
service with a `configData` entry, and importing
`pkgs.ghostunnel.passthru.services.default` to assert the lifted user
unit contains the expected ExecStart flags and `LoadCredential`
entries.
2026-05-04 17:22:16 +02:00
..
release-notes.md home-manager: prepare 26.05 2025-11-26 11:16:38 -06:00
rl-1809.md docs: add release-notes as appendix 2023-12-16 15:46:00 +09:00
rl-1903.md docs: fix link texts in release notes 2023-12-17 00:55:46 +09:00
rl-1909.md docs: fix link texts in release notes 2023-12-17 00:55:46 +09:00
rl-2003.md docs: fix link texts in release notes 2023-12-17 00:55:46 +09:00
rl-2009.md docs: fix link texts in release notes 2023-12-17 00:55:46 +09:00
rl-2105.md docs: fix link texts in release notes 2023-12-17 00:55:46 +09:00
rl-2111.md docs: fix link texts in release notes 2023-12-17 00:55:46 +09:00
rl-2205.md docs: fix link texts in release notes 2023-12-17 00:55:46 +09:00
rl-2211.md docs: fix link texts in release notes 2023-12-17 00:55:46 +09:00
rl-2305.md release/23.05: add swaylock stateVersion change 2025-12-23 16:36:16 -06:00
rl-2311.md docs: fix link texts in release notes 2023-12-17 00:55:46 +09:00
rl-2405.md home-manager: prepare release 24.05 2024-05-25 22:13:25 +02:00
rl-2411.md docs: fix typo in 24.11 release notes 2024-12-16 11:23:18 +01:00
rl-2505.md release/25.05: add git signing format change 2025-12-23 16:36:16 -06:00
rl-2511.md treewide: fix spelling errors 2026-03-11 22:32:16 -05:00
rl-2605.md modules: add modular services support 2026-05-04 17:22:16 +02:00