[Nix-dev] Providing Debian, Arch etc. packages counterproductive?
Roland Koebler
rk-list at simple-is-better.org
Mon Oct 5 16:08:41 CEST 2015
Hi,
+1 for 1) -> add postinst to the Debian-Package
plus: clean up the documentation (see below)
I'm an experienced Linux user (and programmer) but new to Nix, and since
I like the concept of Nix and NixOS, I wanted to try Nix on Debian:
So, I first downloaded the Debian-package from
https://hydra.nixos.org/release/nix/nix-1.10 and installed it with
dpkg -- and then found that this does not work because of missing
dependencies.
I then manually installed the missing dependencies; but unfortunately,
Nix still did not work, because /nix did not exist.
I then found https://nixos.org/wiki/Installing_Nix_on_Debian and
https://nixos.org/nix/manual/#ch-installing-binary -- and didn't
know why there are two different manuals for the same purpose, and
didn't know which one I should follow or whether one is up-to-date
and the other one is outdated.
I ended up removing the Debian-package again, and then used
https://nixos.org/nix/install instead.
So, installing Nix is much more complicated than it would have to
be. This should be improved by:
1. Fix the manual:
The instructions on https://nixos.org/nix/manual/#ch-installing-binary
are incomplete: It says that I can use the install-scipt and
mkdir+chown /nix -- or that I can install a binary package.
But then, I still have to create+chown /nix, so
$ dpkg -i nix_1.8-1_amd64.deb
->
$ dpkg -i nix_1.8-1_amd64.deb
$ mkdir /nix
$ chown alice /nix
(The same is probably valid for the rpm-version)
2. Single-User vs. Multi-User-Mode:
Being new to Nix, I first didn't know what "Multi-User-Mode" meant,
and whether I should install Nix in Single-User or Multi-User-Mode.
A better explaination in chapter 1 of the manual would be great.
(Single-User-Mode: only 1 user can install/remove packages; this can
be root or some other user. Multi-User-Mode: every user can install/
remove packages for himself.)
3. One Manual instead of two:
https://nixos.org/wiki/Installing_Nix_on_Debian and
https://nixos.org/nix/manual/#ch-installing-binary
should be unified, so that it's clear which one should be used.
In addition, I think it's strange that the "/etc/init.d/nix-daemon"-
script is not included in nix, but should be copy-and-pasted from
the wiki-page.
4. Links on download-pages:
Add a link from the download-page https://hydra.nixos.org/release/nix/nix-1.10
to the install-instructions.
5. Install-scripts in packages:
Add postinstall-scripts to the packages.
For Debian, the ideal solution would be to add a postinst-script,
which asks if Nix should be used in single- or multi-user mode,
who should own /nix, and maybe who should be added to the nixbld-
group. (And maybe to add Nix to the official Debian-repository.)
Best regards
Roland
PS: I have not yet tried NixOS, but Nix itself seems to be quite powerful
and useful in other Linux-distributions: It looks to be the easiest
way to (a) install newer versions of some software in e.g. Debian stable,
(b) install software without root-priviledges and (c) package software
in a distribution-independent manner.
So, I think Nix itself would be quite useful for many Debian users,
if they would know about it, and if Nix would be advertised for these
purposes.
On Tue, Sep 22, 2015 at 10:35:01AM +0100, Thomas Hunger wrote:
> Hi,
>
> Slight ramble ahead.
>
> I've managed to get several people to try Nix after constantly raving about
> it and all but one had a bad experience. The reason AFAICT is that they
> first check for nix in their default package tool (apt-get, pacman, ...).
> These packages install nix-* binaries but they don't help with the single
> or multi-user /nix setup. So the first thing they see is "error: creating
> directory ?/nix?: Permission denied".
>
> I can think of two solutions 1) make the packages set up nix correctly so
> nix-env is usable out of the box and 2) Remove all custom packages and tell
> people to use the installer script.
>
> I know 2 is quite radical but to me it seems preferable to leaving people
> who aren't necessarily great unix admins googling for an error with no
> solution on the first results page.
>
> ~
>
>
> [1]
> https://nixos.org/wiki/Installing_Nix_on_Debian
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150922/d495b933/attachment.html
More information about the nix-dev
mailing list