Hi,

Malte Frank Gerdes <malte.f.ger...@gmail.com> writes:

> Hi,
>
> for me `guix system reconfigure` inevitably needs sudo, so i'm not
> actually running it under my user (where i regularly guix pull). So the
> guix checkout of root is most likely older, hence i find it useful that
> it first pulls. guix pull only updates the guix checkout for the current
> user and while i have seen patches allowing to share a single checkout
> with multiple users this isn't the default and has its own
> disadvantages.

Try using the -E flag from sudo[1] to preserve the user environment, like so:
--8<---------------cut here---------------start------------->8---
sudo -E guix system ...
--8<---------------cut here---------------end--------------->8---

This will ensure that sudo uses the same `guix' binary the user has in
PATH.

[1] https://www.sudo.ws/docs/man/1.8.15/sudo.man/#E


Best regards,
Sergio

Reply via email to