Nix: The Nix installer script does not support single user installations anymore on macOS

Created on 21 Feb 2018  路  5Comments  路  Source: NixOS/nix

Nowadays, Nix also supports multi-user installations on macOS which is great -- we can more safely run multiple builds in parallel, we have more purity guarantees, and (of course) multiple user accounts that can use Nix.

I think it's a good thing that this is the default option in the Nix installer. However, it would be nice if you could still use the single-user installations if this is desired, e.g. by providing a command line parameter, to the install script.

The reason why I still want to use a single-user installation is to do iPhone builds. iPhone IPA files must be signed and in order to sign, the builder needs access to the macOS login keychain (I know this is an impurity, but for practical reasons being able to do this, is very very useful!). I am currently running a Hydra build server that builds many IPA apps for internal usage.

In multi-user installations, signing is impossible because every build runs as an unprivileged user that has no access to the login keychain.

At the moment, editing the install script and commenting out a few lines worked for me to get a single user installation again, but this is not very user friendly.

Most helpful comment

iiuc, passing --no-daemon will force a single user install

All 5 comments

I too was surprise today to discover there's no way to do a single-user install on macOS. I'm the only user of my computer, I don't need a multi-user setup. And it's not very user-friendly. For example, it wasn't until a few days ago that I finally figured out how to actually update the nixpkgs channel (sudo -EH nix-channel --update), because my normal user can't even see it in nix-channel --list.

Yes, the single-user setup is still in the script. I summarized the steps here: http://zzamboni.org/post/using-nixs-single-user-mode-on-macos/#comment-3750944802. I agree that the option for the single-user install should be provided.

I got confused by this too. I wondered why the install script was creating all these new users and my own user didn't have nix-env in path.

docs suggest install script uses single user mode.

afaict, the new default is multi user if you are coming from macOS or a Linux system with systemd

iiuc, passing --no-daemon will force a single user install

I think this issue can be closed now, no?

Was this page helpful?
0 / 5 - 0 ratings