* How to share profile among machines ?
@ 2024-04-24 14:54 Emmanuel Medernach
2024-04-24 17:37 ` Tomas Volf
2024-04-25 19:35 ` Felix Lechner via
0 siblings, 2 replies; 5+ messages in thread
From: Emmanuel Medernach @ 2024-04-24 14:54 UTC (permalink / raw)
To: help-guix
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 ?
Cheers,
Emmanuel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to share profile among machines ?
2024-04-24 14:54 How to share profile among machines ? Emmanuel Medernach
@ 2024-04-24 17:37 ` Tomas Volf
2024-04-25 14:50 ` Emmanuel Medernach
2024-04-25 19:35 ` Felix Lechner via
1 sibling, 1 reply; 5+ messages in thread
From: Tomas Volf @ 2024-04-24 17:37 UTC (permalink / raw)
To: Emmanuel Medernach; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 1221 bytes --]
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?
Tomas
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to share profile among machines ?
2024-04-24 17:37 ` Tomas Volf
@ 2024-04-25 14:50 ` Emmanuel Medernach
0 siblings, 0 replies; 5+ messages in thread
From: Emmanuel Medernach @ 2024-04-25 14:50 UTC (permalink / raw)
To: help-guix
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to share profile among machines ?
2024-04-24 14:54 How to share profile among machines ? Emmanuel Medernach
2024-04-24 17:37 ` Tomas Volf
@ 2024-04-25 19:35 ` Felix Lechner via
2024-04-26 14:41 ` Emmanuel Medernach
1 sibling, 1 reply; 5+ messages in thread
From: Felix Lechner via @ 2024-04-25 19:35 UTC (permalink / raw)
To: Emmanuel Medernach, help-guix
Hi Emmanuel,
On Wed, Apr 24 2024, Emmanuel Medernach wrote:
> How do you share profiles among machines ?
Do you mean users?
> 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
My users manage their profiles via Guix Home. Those configuration files
can be exchanged. All my equipment also publishes the local store, so
built files are never far away.
Kind regards
Felix
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to share profile among machines ?
2024-04-25 19:35 ` Felix Lechner via
@ 2024-04-26 14:41 ` Emmanuel Medernach
0 siblings, 0 replies; 5+ messages in thread
From: Emmanuel Medernach @ 2024-04-26 14:41 UTC (permalink / raw)
To: help-guix
Le 25/04/2024 à 21:35, Felix Lechner a écrit :
> Hi Emmanuel,
>
> On Wed, Apr 24 2024, Emmanuel Medernach wrote:
>
>> How do you share profiles among machines ?
> Do you mean users?
The original problem was to copy a profile from another machine and use
it, guix copy <profile> does not add the profile to the list of
profiles. But it is the same problem when sharing profile with another
user on the same machine.
>
>> 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
> My users manage their profiles via Guix Home. Those configuration files
> can be exchanged. All my equipment also publishes the local store, so
> built files are never far away.
Good to know, I would prefer guix copy <profile> to handle adding the
symlinks. Or to have a subcommand for that to avoid fiddling with
"internal Guix scheming".
Thanks to both of you for your help !
Cheers,
Emmanuel
> Kind regards
> Felix
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-04-26 14:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-24 14:54 How to share profile among machines ? Emmanuel Medernach
2024-04-24 17:37 ` Tomas Volf
2024-04-25 14:50 ` Emmanuel Medernach
2024-04-25 19:35 ` Felix Lechner via
2024-04-26 14:41 ` Emmanuel Medernach
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.