New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated instructions and scripts for non-NixOS multi-user installations #135
Conversation
… added profile.d script supporting multi-user installations
Bump. |
+1 |
The problem with this PR is that 1) installing system services is highly distribution-specific; 2) init.d is old-school, the world (even Debian!) is moving to systemd; 3) there are no tests so it will likely suffer from bitrot in the future. (Note that the RPM spec in nix.spec.in uses a systemd unit.) The documentation changes can be merged though. |
1 similar comment
The problem with this PR is that 1) installing system services is highly distribution-specific; 2) init.d is old-school, the world (even Debian!) is moving to systemd; 3) there are no tests so it will likely suffer from bitrot in the future. (Note that the RPM spec in nix.spec.in uses a systemd unit.) The documentation changes can be merged though. |
Also, it adds |
nix-profile-multiuser.sh is the alternative profile.d script (replacing nix.sh) allowing someone to use multi-user settings. The latter script (nix-daemon.sh) is the old fashioned init.d script, but we can also consider not to include it since it's distribution specific (or perhaps use it as an example somewhere). @edolstra What do you think about the alternative profile.d script for multi user installations? Should we make this optionally configurable somehow and keep the single user variant the default? I was thinking to put this alternative script in the share/ folder of the Nix installation and to explain users in the manual how to replace the single user profile.d script with the multi-user variant + some additional instructions describing the remaining steps to make it work. For testing this I'm not yet sure how to do this. I think I have to check how the testsuite is implemented first. |
Is this thread dead? Running into issues with the manual and multi-user on CentOS 7. nix-daemon not found. |
I've succeeded today in installing multi-user Nix on CentOS 7 via |
For reference, here's the resulting script: https://gist.github.com/abbradar/8603326a3dbe66ab09baaa213904b176 |
@abbradar yes, let's update the manual. Can you do a PR? |
Sure, I'll look at it later. Just in case -- @svanderburg, are you okay with me making a PR with (basically) your profile script? Maybe you want to work on this by yourself? |
Another comment for myself to fix later -- RPM script creates |
I've finally got motivation to work on this: see #1141 |
@abbradar you may be interested in the instructions I've written here: https://gist.github.com/expipiplus1/e571ce88c608a1e83547c918591b149f |
@expipiplus1 #1141 does seemingly just that, so good to hear that's a well-known way! Can you try if it works for you if you use Debian/Red Hat derivatives? |
@abbradar I've already got a multi user nix setup going here, but next time I need to set one up I'll give your work a try! |
Closing this since the installer has multi-user support now. We don't have a sysvinit script, but probably not too many people care about that nowadays... |
To do a multi-user Nix installation on regular Linux distros, one detail is missing. The gcroots and profile directories need the right permissions. Without it per-user profiles cannot be created.
Furthermore, I've created a profile.d script containing all stuff needed for multi-user Nix installation (ported from NixOS), as the original nix.sh is missing quite a lot.
I've also created an init.d script for starting and stopping the nix-daemon.
More info about my findings: http://sandervanderburg.blogspot.com/2013/06/setting-up-multi-user-nix-installation.html
I don't know yet if nix.sh and nix-multiuser.sh should both be installed. Maybe we can implement a configure switch for this, or merge nix.sh with nix-multiuser.sh. I need some feedback on this.