5 ms·
> Why does this "not compose well" ? Because you cannot easily write libraries/components that do this. In NixOS, other modules can override the options of ot
by nh2 5y ago
> Why does this "not compose well" ?
Because you cannot easily write libraries/components that do this.
In NixOS, other modules can override the options of other modules. For example, a a web app can set the nginx options that it needs, instead of requiring you (the admin) to "drop a file" in /etc.
This is one of the reasons why on Ansible Galaxy (community repository of Ansible roles) there are 527 nginx roles [1], and in NixOS there is 1 nginx module that everybody code-reuses.
[1]: https://galaxy.ansible.com/search?deprecated=false&tags=web&keywords=nginx&order_by=-relevance&page=1 https://galaxy.ansible.com/search?deprecated=false&tags=web&...
- Arnavion 5y agoWhat does systemd.services.nginx.unitConfig.StartLimitIntervalSec = 0; do that it doesn't require root? If the point is that it's not manipulating a system-level nginx service but a user-level one, then writing the systemd override file in the way I described doesn't require root either.
- nh2 5y agoApplying the NixOS config requires root -- that's not what it's about. What I mean is that services can set other services' options, without you (the admin) having to to write such overrides manually.
- Arnavion 5y agoNothing prevents $service's package from creating /etc/systemd/system/nginx.service.d/90-restart-always.conf in a regular distro.