[Nix-dev] Using Nixpkgs outside of NixOS

Wout Mertens wout.mertens at gmail.com
Thu May 29 18:34:00 CEST 2014


Another issue I just remembered is that of setuid binaries. NixOS has a
mechanism for it, and it could just as easily be used elsewhere. Without
it, you can't easily use qemu for example.

Wout.

On Thu, May 29, 2014 at 5:28 PM, Wout Mertens <wout.mertens at gmail.com>wrote:

> I think there is room for improvement for installing and using nixpkgs on
> another distribution.
>
> I see two big problems:
> 1. installation
> 2. environment variables
>
> Installation:
> ========
> The single-user installation is cute, but realistically you need root
> anyway to create /nix so it would be nice if there was a script that set up
> the proper environment, with the correct permissions under /nix/var/nix,
> the system-wide shell profiles, nixbld users, a
> users-that-are-allowed-to-use-nix-env group and the nix-daemon startup
> script for the popular distros.
>
> Right now you need to manually do these things, and some are not obvious
> like having to change your ~/.nix-profile dir to a per-user one
> (/etc/profile.d/nix.sh points it to /nix/var/nix/profiles/default which
> doesn't exist, and nix-env -i doesn't seem to handle that case).
>
> The end goal should be "run this script and you'll have full access to
> everything in Nixpkgs with per-user profiles and secure defaults". All
> barriers to adoption should be removed as much as possible.
>
> Environment Variables:
> =================
> There are several packages that rely on environment variables to work
> correctly, like glibc ($TZ_DIR) and curl ($CURL_CA_BUNDLE). Those aren't
> defined when you're not on NixOS.
> For the regular $NIX_PATH, $PATH etc, sourcing nix.sh from /etc/profile
> isn't enough, because for example ssh doesn't start a bash login shell. For
> those cases, it needs to be sourced from /etc/bash.bashrc as well.
> Similar issues are probably happening with tcsh, zsh etc.
>
> Thoughts?
>
> Wout.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140529/afcef3ad/attachment.html 


More information about the nix-dev mailing list