On Fri, Jan 17, 2025 at 12:50:42PM +0000, Gottfried wrote:
> since 2,5 years, when installing Guix SD on my laptop
> I was advised to do a (and I also understood the manual like this)
> 
> "guix pull" and a "sudo guix system reconfigure /etc/config.scm"
[...] 
> so I did the same as David and it worked for 2,5 years.

Yes, I looked at the Git history of the documentation and see that we've
recommended doing it this way for quite some time. So, clearly, it can
work, and we did check that it would work in the past.

However, as illustrated by David's question, it doesn't *always* work.

On the other hand, if you use sudo in a more explicit way, you can be
more sure of what happens.

I'm not sure what went wrong for David. One could figure it out with
some effort. Overall, Guix relies on environment variables to work
correctly, but most users have never had to care about their environment
and so they don't fully understand how it works, especially when
elevating privileges.

To illustrate the issues concretely, log in as your regular user, and
then compare the output of `which guix`, `sudo which guix`, and `sudo -E
which guix`.

If you get a different result for any of these, then the environment is
being constructed incorrectly.

Reply via email to