[Nix-dev] Nix profiles

Richard Wallace rwallace at thewallacepack.net
Tue Oct 30 22:32:50 CET 2012


On Tue, Oct 30, 2012 at 2:23 PM, Vladimír Čunát <vcunat at gmail.com> wrote:
> On 10/30/2012 09:50 PM, Richard Wallace wrote:
>>
>> I would have tried that, but after switching to a new profile none of
>> the nix commands were available.  I installed using the generic x86_64
>> tarball, which apparently means that they are installed in the nix
>> store.  So when I switched to a non existent profile, I no longer had
>> access to them.
>
>
> The only thing "nix-env -S <path>" does is symlinking ~/.nix-profile to
> <path>. We do that to make even all running applications use the new paths
> on any further file-opens (~/.nix-profile/bin is in $PATH, etc.). This is
> designed for the all-purpose working environment for the user; on NixOS is
> there's also the /run/current-system/sw/ profile for whole-system stuff.
>
> For project environments I suppose you should use nix-env -p
> /nix/var/nix/profiles/per-user/$USER/$project1 and then always add this one
> in the shell you use (probably you'll shorten it into some symlink from your
> project). Note that all these profile paths are again just symlinks to the
> current generation of the profile, like
> /nix/var/nix/profiles/per-user/$USER/$project1-123-link in this case, so
> they can be switched on update.
>

Ok, I used `nix-env -p <new-profile> -iA nixos.pkgs.nix` and then was
able to switch to it and start adding other packages.  All good now.
Thanks.

Rich

> I hope it's clear now.
>
> Vlada
>
>
> _______________________________________________
> 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