[Nix-dev] Using Nixpkgs outside of NixOS

Gergely Risko gergely at risko.hu
Tue Jun 3 18:30:54 CEST 2014


Hi,

For single-user implementations we have this:
https://github.com/nilcons/ceh

In our startup we actively use this on several workstations and servers
with Debian/Ubuntu base systems.

This is less ambitious than your ideas, but worked very well for us.

Gergely

On Thu, 29 May 2014 17:28:48 +0200, Wout Mertens <wout.mertens at gmail.com> writes:

> 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.
>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev



More information about the nix-dev mailing list