Le 24/04/2024 à 19:37, Tomas Volf a écrit :
On 2024-04-24 16:54:19 +0200, Emmanuel Medernach wrote:
Hello Guix !

How do you share profiles among machines ? For instance 2 users wants to
have the same profile, user A shares the directory /gnu/store/...-profile to
user B, user B either get access to it directly or from a remote machine
with a  "guix copy <profile>", user B could now use this profile like this:

  export GUIX_PROFILE="/gnu/store/...-profile"
  source "$GUIX_PROFILE/etc/profile"

But there is a problem: this profile is not listed with

  guix package --list-profiles
  guix gc --list-roots

The problem is that if user A deletes this profile it gets garbage collected
even if user B still needs to use it.

So the question is: How user B could add an existing /gnu/store/...-profile
(either existing directory or obtained from a guix copy) to the profile and
root list ?
I think you can just create a symlinks in the /var/guix/profiles/per-user/B for
the profile and in the /var/guix/gcroots/profiles/per-user/B for the gc roots.

I *think* this should work?

Awesome ! This works.

Would it be a good idea to add a guix subcommand to do that ?

Cheers,

Emmanuel


Tomas

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

Reply via email to