From: "Clément Lassieur" <clement@lassieur.org>
To: t_w_@freenet.de
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Root guix dereferencing
Date: Mon, 19 Nov 2018 16:06:01 +0100 [thread overview]
Message-ID: <87bm6lnm3q.fsf@lassieur.org> (raw)
In-Reply-To: <30f615aa-d80d-e884-1629-a8a8fde60fee@freenet.de>
Thorsten Wilms <t_w_@freenet.de> writes:
> On 19/11/2018 15.07, Clément Lassieur wrote:
>> It doesn't need to contain 'sudo' and 'root', because 'root' is just a
>> user, so everything works the same way.
>
> $: which guix
> /home/thorwil/.config/guix/current/bin/guix
>
> $: sudo which guix
> /usr/local/bin/guix
>
> $ sudo -E which guix
> /usr/local/bin/guix
>
> $: sudo -i
> root@charly:~# which guix
> /root/.guix-profile/bin/guix
>
> I wouldn't describe that as working the same way, especially since only the
> symlinks for the plain user are being updated.
If you check ~root/.config/guix/current/bin/guix, you'll see that it's
updated when you run 'guix pull' as root. If you want that guix to be
used for your 'root' user, you just need to make sure
~root/.config/guix/current/bin/ is first in root's $PATH.
You can substitute 'root' with whatever else in the above statement.
'sudo', however, is more tricky to use. I only use it for 'guix system
reconfigure' because it requires root's privileges. 'sudo -E guix
system reconfigure config.scm' would for example use my own environment
variables, thus my own guix, with root's privileges.
If you are using Ubuntu, you don't need to use that command though, but
you need your systemd's guix-daemon to point to a recent guix. It could
be either the one updated by root's 'guix pull', or the one updated by
your current user's 'guix pull'. I chose the latter because I want to
run 'guix pull' only once.
Does it make more sense?
Clément
next prev parent reply other threads:[~2018-11-19 15:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-17 11:17 Root guix dereferencing Thorsten Wilms
2018-11-18 23:06 ` Leo Famulari
2018-11-19 9:12 ` Thorsten Wilms
2018-11-19 10:20 ` Clément Lassieur
2018-11-19 11:47 ` Thorsten Wilms
2018-11-19 14:07 ` Clément Lassieur
2018-11-19 14:32 ` Thorsten Wilms
2018-11-19 15:06 ` Clément Lassieur [this message]
2018-11-19 17:08 ` Thorsten Wilms
2018-11-19 18:27 ` Clément Lassieur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bm6lnm3q.fsf@lassieur.org \
--to=clement@lassieur.org \
--cc=help-guix@gnu.org \
--cc=t_w_@freenet.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).