unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Daniel Littlewood <danielittlewood@gmail.com>
To: Emmanuel Beffara <manu@beffara.org>
Cc: help-guix@gnu.org
Subject: Re: share guix and its store between distributions
Date: Thu, 5 Oct 2023 17:11:08 +0100	[thread overview]
Message-ID: <CAFDSbVezvOy7SK2QLgZ0TCLywwteUCkD81NREiqNWX1rur3Y_Q@mail.gmail.com> (raw)
In-Reply-To: <20231005170349.GR1334@beffara.org>

Hi Emmanuel,

Do you expect to share exactly the same packages in Debian vs guix, or
just an overlapping subset?

I assume that if the packages are the same, and they're building the
same versions, then the hash identifying them should be the same, and
guix should refrain from rebuilding the package (and simply set up the
link to the store). If they aren't the same, then you have to make
sure the system A does not clean up any packages used by system B and
not system A. I guess this is why you mention GC roots. My gut feeling
is that that will be a lot more complicated, because you have to trick
guix into getting its garbage collection "wrong".

Perhaps you could keep the two stores separate, but mount them as a
union file system? So system A would mount system B's store into its
own, read-only. System B would be able to build additional packages
not found in A, but could not clean up system A's packages. I don't
know how guix would react to such a permission error. I think it
expects to be the only master of the store.

All the best,
Dan

On Thu, Oct 5, 2023 at 4:04 PM Emmanuel Beffara <manu@beffara.org> wrote:
>
> Hello Guix,
>
> Is there a way to share Guix and its store between several distributions?
>
> My situation is that I have a Guix system installed as my main system, but I
> would like to install another distribution on the same machine (a current
> Debian, specifically) and use Guix as a package manager there, in order to
> benefit from its ability to create reproducible environments.
>
> Of course, it works to have the other distribution completely independent,
> with its own Guix store. The only thing is to handle Grub correctly to give
> access to both distros. But it feels like a significant waste of resources,
> since I will end up having many things in both stores.
>
> Moreover, ideally I would like to share home directories between the two
> distributions, by mounting the same partition as /home, and still be able to
> use `guix home` and `guix shell` in both distributions. By some minimal
> tuning, I can make it so that users have the same UIDs and GIDs in both
> distributions. But I imagine that using Guix in both distributions can become
> problematic if they don't share the store and the state in `/var/guix`, for
> instance if they don't share GC roots.
>
> Is there a proper way to make that work? Or is it a bad idea?
>
> --
> Emmanuel
>


  parent reply	other threads:[~2023-10-05 16:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05 15:03 share guix and its store between distributions Emmanuel Beffara
2023-10-05 15:42 ` Felix Lechner via
2023-10-05 16:11 ` Daniel Littlewood [this message]
2023-10-08  7:03 ` Efraim Flashner
2023-10-09  8:43   ` Emmanuel Beffara
2023-10-11 12:45     ` Simon Tournier
2023-10-11 15:56       ` Emmanuel Beffara
2023-10-11 20:14         ` Simon Tournier

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=CAFDSbVezvOy7SK2QLgZ0TCLywwteUCkD81NREiqNWX1rur3Y_Q@mail.gmail.com \
    --to=danielittlewood@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=manu@beffara.org \
    /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).