top | item 27652785

(no title)

GuidoW | 4 years ago

> Use NixOS and you'll love systemd.

I use NixOS but certainly not love systemd. Instead, I've created a way to replace it with s6.[1]

1: https://sr.ht/~guido/nixos-init-freedom/

Cheers, Guido.

discuss

order

forgotpwd16|4 years ago

That's nice and it showcases how Nix can create a declarative process management atop a script-based imperative manager. How is your experience with it? Also note that there's https://github.com/svanderburg/nix-processmgmt, a manager agnostic processes management framework supporting s6 among others, but your way seems a bit more straightforward.

GuidoW|4 years ago

Thanks,

My use case is to get my VPS run a web and mail service on Nixos but without the bloated binary logging of journalcontrol. The indexes in these log files change heavily between snapshots so they take up way more disk space than append-only text logs, that snapshots very well on ZFS.

My experiences while building:

- It's easy to use the config.system.services tree of the user-services (ssh, bind, caddy, etc) to create s6-services;

- Sometimes it needs a change to make it work [1] on s6;

- That same change seems oblivious to systemd. I guess it just starts the process and never bothers to monitor liveness. So much for a process management system ;-)

- Nixos packagers seems overworked, as my pull requests seem to get stuck ;-(

- Nixos use of systemd leaves a lot of decisions to resolve at boot time, decisions that I want to make at build time with s6;

- However, I cannot create a s6 dependency tree specification at build time, that's still at run time;

- Because S6 uses the service-directory to store state-files in the same directory (no /etc-/var split).

1: https://github.com/NixOS/nixpkgs/pull/122844