[Nix-dev] Re: patch to allow switching profiles

Lluís Batlle i Rossell viriketo at gmail.com
Sun Sep 19 19:09:06 CEST 2010


On Sun, Sep 19, 2010 at 08:35:08PM +0400, Yury G. Kudryashov wrote:
> roconnor at theorem.ca wrote:
> 
> > Here is a patch to allows nix-env -S to actually switch profiles.  Before
> > the patch switch profiles relinks the ~/.nix-profile directory, but
> > because the ~/.nix-profile directory wasn't in the path, this switch
> > didn't really do much.
> > 
> > The patch makes me a little nervous because the path is set to
> > ~/.nix-profile, but the directory isn't created until later in
> > /etc/profile.  Still, I think it is an improvement.
> I have ~/.nix-profile -> /nix/var/nix/profiles/per-user/urkud/profile, so 
> everything works. What exactly doesn't work for you?
It's about setting making another profile, like in your user 'urkud' running:
nix-env -p /nix/var/nix/profiles/per-user/urkud/newprofile -i something
And then making:
nix-env -S /nix/var/nix/profiles/per-user/urkud/newprofile

Btw, I applied the patch.



More information about the nix-dev mailing list