
This fixes the evaluation of modules such as those tested by nix-build -A nixosTests.php.fpm-modular ... ahead of the proper fix that factors meta.maintainers out of NixOS.
Modular Services
This directory defines a modular service infrastructure for NixOS. See the Modular Services chapter in the manual [source].
Design decision log
-
system.services.<name>
. Alternatives consideredsystemServices
: similar to does not allow importing a composition of services intosystem
. Not sure if that's a good idea in the first place, but I've kept the possibility open.services.abstract
: used in https://github.com/NixOS/nixpkgs/pull/267111, but too weird. Service modules should fit naturally into the configuration system. Also "abstract" is wrong, because it has submodules - in other words, evalModules results, concrete services - not abstract at all.services.modular
: only slightly better thanservices.abstract
, but still weird
-
No
daemon.*
options. https://github.com/NixOS/nixpkgs/pull/267111/files#r1723206521 -
For now, do not add an
enable
option, because it's ambiguous. Does it disable at the Nix level (not generate anything) or at the systemd level (generate a service that is disabled)? -
Move all process options into a
process
option tree. Putting this at the root is messy, because we also have sub-services at that level. Those are rather distinct. Grouping them "by kind" should raise fewer questions. -
modules/system/service/systemd/system.nix
hassystem
twice. Not great, but- they have different meanings
- These are system-provided modules, provided by the configuration manager
systemd/system
configures SystemD system units.
- This reserves
modules/service
for actual service modules, at least until those are lifted out of NixOS, potentially
- they have different meanings