Modular Services: Difference between revisions
→Research Topics: Intra-service dependencies |
Eveeifyeve (talk | contribs) m fix: references |
||
| (4 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{warning | Work in progress }} | |||
Modular Services are a new experimental module system support in Nixpkgs, that aims to expand the module systems (Eg. NixOS, home-manager, nix-darwin, etc) ecosystem with modularity and portability. Modular services is designed to integrate/compose with other modules systems such as NixOS. | |||
== Difference between Traditional Module Systems (such as NixOS) vs Modular Services == | |||
Modular services are built for composability, re-usability, are not defined in sets of options, portable. | |||
Where as traditional modules are the opposite. | |||
== | == How to use == | ||
* System: | |||
<syntaxhighlight lang="nix"> | |||
system.services.<name> = { | |||
# Usage inside of the traditional module system like NixOS... | |||
imports = [ pkgs.example.services.default ]; | |||
example.allowAll = false; | |||
}; | |||
</syntaxhighlight> | |||
* User: | |||
{{warning | Not all module systems support this, like for example NixOS.}} | |||
<syntaxhighlight lang="nix"> | |||
system.user.services.<name> = { | |||
# Usage inside of the traditional module system like NixOS... | |||
imports = [ pkgs.example.services.default ]; | |||
example.allowAll = false; | |||
}; | |||
</syntaxhighlight> | |||
== Resources == | |||
{{Cleanup|reason=More information is needed.}} | |||
= | # {{manual|nixos|modular-services|NixOS Modular Services|subsection=modular-services}} | ||
# {{issue | 428084 | Tracking issue}} | |||