I’ve only tried single-user installation before in Ubuntu. Recently I just found that Ubuntu’s APT package manager has a package called nix-bin.
I’ve tried the package. Seems that it can do some steps of multi-user installation, including installing nix binaries, creating /nix, and setting up systemd services. However, the APT installation seems to only do a very basic setup. No channel is added, and /nix/var/nix/profiles/per-user is empty.
So just want to know if someone has context about that package about:
Is it a recommend way to install nix to Ubuntu?
After apt install nix-bin, what’s the following steps to generate profiles?
The only actively maintained ways to install Nix standalone I’m aware of are the official installer and the DetSys installer. There exist packages for Arch and Ubuntu, and possibly more, but we’ve seen issue reports and it appears like they’re rather out of date.
Would be great if it weren’t that way, as that would ease onboarding a lot. Help appreciated!
For ubuntu-related differences, have a look at /usr/share/doc/nix-bin/README.Debian
This file explains that by default only users in a specific group are allowed to use nix, for example.
If you don’t have channels (please check both as your user and as root) then you can add one yourself
I’m a bit sad that the first answer to this kind of request is “you don’t use the upstream-blessed installation method, but a downstream package, it’s not supported bye”. As a distribution, NixOS is a prime offender in “weird downstream packaging”, and I am very grateful when upstream is supportive of our “special needs”. I would like us to return the favor by being supportive of people using downstream packaging.
That said it is true that the nix version in ubuntu is not very recent.
I very much share that frustration, being a user of Nix myself. My answer is merely factual: no one put in the work, so that’s the situation. And everyone I know is fully booked solving other problems picked from the bottomless pit of problems. And we can’t make people do things.
I derive part of my income from using money to incentivize people to do particular Nix things, and currently it’s so little we have available in comparison to the volunteer work and donated developer time, that it barely makes a dent in the big picture.