[Nix-dev] NIX_REMOTE

Marco Maggesi maggesi at math.unifi.it
Wed Jul 25 22:47:33 CEST 2012


Hi!

In the the nix manual (sec 3.4.1 Single-user mode) suggests to chown the
store to normal user account.
However, in the present nix version, /etc/profile.d/nix.sh uses the
following logic to set NIX_REMOTE

# Set up secure multi-user builds: non-root users build through the
# Nix daemon.
if test "$USER" != root; then
    export NIX_REMOTE=daemon
else
    unset NIX_REMOTE
fi

As a consequence, those that want to setup nix as unprivileged user needs
to issue

unset NIX_REMOTE

otherwise the get a pretty indecipherable error like

  cannot connect to daemon at `/nix/var/nix/daemon-socket/socket': No such
file or directory at
/nix/store/rxaasfq7k5lr4mxvp3wcc0lg3z0iasbw-nix-1.1/bin/nix-prefetch-url
line 100.

I suggest to update the documentation or to change the behavior for setting
NIX_REMOTE in nix.sh.

Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120725/ea2f0a82/attachment.html 


More information about the nix-dev mailing list