unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Emmanuel Beffara <manu@beffara.org>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: help-guix@gnu.org
Subject: Re: share guix and its store between distributions
Date: Mon, 9 Oct 2023 10:43:05 +0200	[thread overview]
Message-ID: <20231009104305.GD1344@beffara.org> (raw)
In-Reply-To: <ZSJUTDbSdCLJCHA-@3900XT>

Hello,

Thanks for the feedback.

De Efraim Flashner le 08/10/2023 à 09:03:
> > Is there a way to share Guix and its store between several distributions?
> > [...]
> 
> It looks like you already have the right idea. You'd have to share /gnu
> and /var/guix between the two distributions, as well as have the same
> UID (and possibly GID) for the users.

If I know for sure that there is no state anywhere else than that, then it
looks fine. I was worried that running Guix's daemon and command would leave
things inconsistent otherwise.

> You would also have to tell Guix's grub to also add an entry for Debian.

I already do that by adding a menu-entry by hand. It works because Debian
stores its kernel and initrd in a predictable place. I just have to refrain
Debian from updating grub itself, otherwise the entries for Guix system
disappear. I guess this kind of problem occurs whenever one tries to set up
multiboot with a single Grub for several distributions, anyway.

> I don't know if you'd end up having issues with graphical programs from
> Guix overriding environment variables for Debian or if there might be
> issues with guix-home with a foreign distro.

So far there have been some issues with programs from my home Guix profile
behaving differently when run from Debian. I still have to explore a bit to
diagnose this.

As for other replies I got:

From Felix Lechner:
> I used Debian for twenty-five years and switched to GNU Guix eighteen months
> ago. I see no reason to run both, but I also like being at the frontier. Why
> do you need Debian?

I intend to keep Guix as my regular system as it has provided me some benefits
already. But some tools that I have to use occasionally are not (yet)
available in Guix and might be available in Debian or provided as binaries
that often rely implicitly on FHS (I try to use Flatpak or Guix containers
for those, but even that is not enough on some rare occasions).

Also, some services behave differently between distributions and support for
some hardware also varies (for instance I have a USB-C dock that fully works
on Debian and only partially on Guix). For such cases, having two systems to
compare can be instructive and beneficial for both.

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

More like an overlapping subset. In Debian would like to use Debian-provided
packages as much as possible and only rely on Guix for custom packages I made
or reproducible environments.

> 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".

Indeed that is the kind of problem I would like to avoid, hence the idea of
sharing Guix's state bewteen systems. I would certainly like to avoid
"tricks" to make things work.

-- 
Emmanuel


  reply	other threads:[~2023-10-09  8:43 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
2023-10-08  7:03 ` Efraim Flashner
2023-10-09  8:43   ` Emmanuel Beffara [this message]
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=20231009104305.GD1344@beffara.org \
    --to=manu@beffara.org \
    --cc=efraim@flashner.co.il \
    --cc=help-guix@gnu.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).