[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should I upgrade root user's guix too?

From: Attic Hermit
Subject: Re: Should I upgrade root user's guix too?
Date: Wed, 27 Sep 2017 11:04:59 +0900

Oleg Pykhalov <address@hidden> writes:

> #!/bin/sh
> GUIX_LATEST=/root/.config/guix/latest
> unlink $GUIX_LATEST && ln -s $(readlink $HOME/.config/guix/latest) 

Nice tip. I've been annoyed about the fact that root compiles almost
same definitions once again after a non-priv user has done.

But I wonder, in that sense, if root user has only "guix" package which
should be located on the non-priv user, then don't we just replace
root's profile into the one of the non-privileged user? like this:

unlink $ROOT_LATEST && ln -s $(readlink $USER_LATEST) $ROOT_LATEST
unlink $ROOT_PROFILE && ln -s $(readlink $USER_PROFILE) $ROOT_PROFILE

Once you've done this, root won't need to `guix pull && guix package -u'
anymore because the profile of the user is the same one that root
has. It'll cause severe security problems because the non-priv user will
be able to manipulate root's system through guix, but theoretically it
should work. (I assume that guix profile is user-agnostic. If it isn't,
please correct my error.)

Root would get redundant packages, but it wouldn't matter because the
only package root will use is guix and it won't be influenced. Root will
lose its generation history, but will get and share user's history

P.S. I know that only changing the path of package definitions is enough
to saving a time because guix will graft the packages which are already
installed in almost no time, but just for the curiosity.

Attic Hermit

reply via email to

[Prev in Thread] Current Thread [Next in Thread]