Danny Milosavljevic <dannym@scratchpost.org> skrev: (18 januari 2019 21:29:28 CET)
On Fri, 18 Jan 2019 19:03:18 +0000
Caleb Ristvedt <caleb.ristvedt@cune.org> wrote:

To be clear, it's not so much a real problem as an eyesore. 'sudo guix
package ...' and 'sudo guix pull' will operate on root's profile(s) as
expected, but that also means 'sudo guix system reconfigure' will look at
root's profile when deciding whether to say that it's out of date, even
though the guix actually used for reconfiguring may not be out of date. It
pretty much only ever comes up when reconfiguring, but for those like
myself who are worried by messages like that it can be confusing to try to
resolve.

There's an environment variable "SUDO_USER" which still contains the name
of the original user.

We could check SUDO_USER instead of USER if USER=root, otherwise check USER.

+1 great idea.

Maybe we could have an explicit --root switch too?
Then we could state in the manual that guix always runs with your user profile guix unless you give it --root.

We could the clearly state why you might not want it to use a root profile of guix on a typical single user system.
--
Sent from my p≡p for Android.