guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: Configurable placing of the ~/.guix-home symlink


From: Andrew Tropin
Subject: Re: RFC: Configurable placing of the ~/.guix-home symlink
Date: Thu, 05 May 2022 09:44:00 +0300

On 2022-04-29 11:44, EuAndreh wrote:

> Hi Guix!
>
> When trying to get a clean $HOME, I see that the ~/.guix-home path is fixed in
> the code under gnu/home/*,
> usually via (string-append (getenv "HOME") "/.guix-home").
>
> I want to propose a configurable path to ~/.guix-home, and allow this to be
> chosen in the (home-environment ...) declaration.  It would expose a
> GUIX_HOME_PATH_ENVIRONMENT variable[0] so that one could dynamically retrieve
> the path to it, if needed in scripts or similar.  The implementation would 
> also
> need to be able to handle changes in the (home-environment ...) declaration,
> and know when to remove the old symlink from ~/.guix-home to the new path,
> similar to what the gnu/home/services/symlink-manager.scm does nowadays.
>
> How do you feel about this?  What do you think?  Is there a shortcoming,
> pitfalls, limitations that this approach entails?
>
> I'm willing do work on the implementation and on tests where applicable, and
> send the patches (eventually when I get this done =p).  I wanted to raise a
> discussion before jumping into the code, even to get input and see how the
> community feels about this.
>
> WDYT?

Hi EuAndreh,

This feature was removed from Guix Home 10 months ago:
https://git.sr.ht/~abcdw/rde/commit/a4b3a93b88f29eb4b37695e04e0ca200184fec28

I don't remember all the reasons, but it was slightly problematic.  I'll
name a few things, which come to my mind:

- Due to implementation of guix services extension mechanism, it's
  necessary to pass the path to guix home directory to some services
  explicitly and instantiate them even if they not used.

https://git.sr.ht/~abcdw/rde/commit/a4b3a93b88f29eb4b37695e04e0ca200184fec28#gnu/home.scm-1-4

- It's hard to cleanup environment variables like PATH and similiar when
  GUIX_HOME_DIRECTORY changed.
  
- It was hard to know if and where the previous generation was
  installed, right now it can be easier, but some edge cases can pop up.
  For example if activation script called outside of `guix home
  reconfigure` or some other circumstances.

If I remember something else, I'll let you know.

I don't dissuade you, but not sure if abilitiy to move ~/.guix-home
around worth the hassle.  Aesthetically pleasant paths in the cost of
development and maintaining a feature, which affects and complicates
many places.

-- 
Best regards,
Andrew Tropin

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]