Oleg Pykhalov <[email protected]> writes: > #!/bin/sh > GUIX_LATEST=/root/.config/guix/latest > unlink $GUIX_LATEST && ln -s $(readlink $HOME/.config/guix/latest) > $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: #!/bin/sh ROOT_LATEST=/root/.config/guix/latest ROOT_PROFILE=/root/.guix-profile USER_LATEST=/home/alice/.config/guix/latest USER_PROFILE=/home/alice/.guix-profile 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 instead. 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
