Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

svanderburg
Copy link
Member

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.

… added profile.d script supporting multi-user installations
@chexxor
Copy link

chexxor commented Nov 30, 2013

Bump.
What's the status on merging this? The documentation for multi-user Nix in the Nix manual does not work for me.

@domenkozar
Copy link
Member

+1

@edolstra
Copy link
Member

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
@edolstra
Copy link
Member

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.

@edolstra
Copy link
Member

Also, it adds nix-profile-multiuser.sh and nix-daemon.sh, but doesn't mention them in the manual.

@svanderburg
Copy link
Member Author

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.

@josdotso
Copy link

Is this thread dead? Running into issues with the manual and multi-user on CentOS 7. nix-daemon not found.

@abbradar
Copy link
Member

abbradar commented Oct 6, 2016

I've succeeded today in installing multi-user Nix on CentOS 7 via rpmbuild. Bundled nix.sh is completely useless -- I've essentially needed to copy @svanderburg 's script verbatim from his article to get it working. Maybe we want to replace it?

@abbradar
Copy link
Member

abbradar commented Oct 6, 2016

For reference, here's the resulting script: https://gist.github.com/abbradar/8603326a3dbe66ab09baaa213904b176

@domenkozar
Copy link
Member

@abbradar yes, let's update the manual. Can you do a PR?

@abbradar
Copy link
Member

abbradar commented Oct 6, 2016

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?

@abbradar
Copy link
Member

Another comment for myself to fix later -- RPM script creates nix-builder-* users when we expect nixbld* by default. It's better to fix it to conform than change the setting, I think.

@abbradar
Copy link
Member

I've finally got motivation to work on this: see #1141

@expipiplus1
Copy link
Contributor

@abbradar you may be interested in the instructions I've written here: https://gist.github.com/expipiplus1/e571ce88c608a1e83547c918591b149f

@abbradar
Copy link
Member

abbradar commented Dec 5, 2016

@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?

@expipiplus1
Copy link
Contributor

@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!

@edolstra
Copy link
Member

edolstra commented Sep 1, 2018

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...

@edolstra edolstra closed this Sep 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants