Install nix-daemon on non-systemd init

Playing around with s6 on artix linux.

I’m curious to know if nix-daemon will only run on systemd, or if it will run but the installer doesn’t provide init scripts for other init systems.

If the latter, what’s the best way to do a multi-user install for a non-systemd distro? I can write my own init script.

nix-daemon should have no problem running with other service managers — it works with launchd on OSX too. Running it should be a matter of executing nix-daemon as root, nothing special there.

You’ll also need build users — these should be in the nixbld group by default, and there should be at least one per derivation you want to be able to build in parallel. I think the only requirement for these users is to be members of the group, but in terms of good practice these users should typically not own any persistent directories in the filesystem and not be able to log in (since they don’t need it).

If your service manager needs it backgrounded, you’ll need to write a script to take care of that — it will run in the foreground by default.

1 Like

it will run in the foreground by default.

Good to know.

I’ve spent about an hour ripping out all the systemd stuff from the bundled install scripts and it looks like it installed properly.

If I were to clean that up, would that be a good candidate for a pull request? I believe all I did was remove a few lines from install-multi-user.

I submitted a pull request of my changes here

1 Like