Hi Daniel,

Daniel Hatton <dan.hat...@btinternet.com> writes:

> On 23/03/2025 15:50, Rutherther wrote:
>
>> Yes, exactly. sudo will use the guix from your user's path, so root's
>> guix is not used for this.
>
> Hmm.  I usually use "su -" rather than "sudo" when I need root 
> privileges (mainly because I have a history of creating overcomplicated 
> /etc/sudoers files such that I can never predict whether I'm allowed to 
> do any given task with sudo).  Hence, I guess this advice doesn't apply 
> to me.  Am I alone in this?

With su -, you won't have user's guix in path, but that doesn't have to
stop you from using it. You can either try making some sort of a utility
that will copy the PATH (like sudo does), or just refer to it with full
path, ie `/home/user/.config/guix/current/bin/guix`. So you still of
course don't have to use root's guix. But you're right that my original
suggestion to just run guix normally (sudo guix...) doesn't hold here.

Another possibility would be to just use plain su without login shell,
but that way you might end up with root owned cache files in your user's
profile, so you decide.

Regards,
Rutherther

Reply via email to