From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 2BtdDlrgHmXBWQAA9RJhRA:P1 (envelope-from ) for ; Thu, 05 Oct 2023 18:12:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2BtdDlrgHmXBWQAA9RJhRA (envelope-from ) for ; Thu, 05 Oct 2023 18:12:10 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E7C9038C15 for ; Thu, 5 Oct 2023 18:12:09 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=WeR+me22; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696522330; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=2EvgkhccdtLzTRFcaIrQ71LxkhfFWWESQuN+E4BNmU8=; b=hhGWdPbMIhtPkzL4y6azr8uqBzh2lY2re5jbzu2rOs5kLLt/qXD7V/LUW8yOs+GZFeL1Qn 3yN7w5NCdtnkMuagdXQQh4EITqgqzdr2Bb1hqmgPxvLGkeY5g6SA6NaKZ2K6H8qQ+zqbcJ h4paeXYg5Sj8I05PLZTdKTxsE50QcDWMnKyMLTpzTcBn78e5aF5mVrttW0mN0JHC0Cqmwb F9giQaidmVmbICbTHpyw8z4rzN39tAE5Bl/OC7lOb0EvM0RxpWSvzsBJ8ltu3jtnVeMEzZ I++i5WYnZby1U9jNCoSIu3gNryq4XddpjJLvrNeSwj+zkexPDFOL5qRWaFDKBg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=WeR+me22; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696522330; a=rsa-sha256; cv=none; b=SFGPZZW3jAPViWAtdZ97aCncZa7Rq+r4L9LlK0igWf8jxX/eJimvLHPNedfA7bMCV4/6lQ zgji5XLWHp15mLfn5GbzgpGj7RQbePjvs9neYGGWVmBZTeQewqR3IM0lbvsLKEZIb9Nz/T X0iYaYFJf4Y5ZiBHHseGR9mNKVRHEd419+mfOnZ/UeODRamgCuyoEWUj6r7eWrBQ5ZgFFY 1sOgU8vtDFeiGAabcmHuB2HhlF7qPormhGoLsM9QSbEzXS9tN7yOPRpc7BxgPn5PhbW7RY 1EkR5hvuNnDgh8v12+RErUHAJroKOIu1xPbGchoS70xL65LDfp3ynGN9T02Nmw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoQwf-0006WK-9t; Thu, 05 Oct 2023 12:11:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qoQwe-0006W5-Fg for help-guix@gnu.org; Thu, 05 Oct 2023 12:11:24 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qoQwc-0002MA-QE for help-guix@gnu.org; Thu, 05 Oct 2023 12:11:24 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-5045cb9c091so1528803e87.3 for ; Thu, 05 Oct 2023 09:11:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696522280; x=1697127080; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=2EvgkhccdtLzTRFcaIrQ71LxkhfFWWESQuN+E4BNmU8=; b=WeR+me22a7SYtS1hF/cqsf2YpnpsavnMz6/+0oXdqL9Ym4qxh9q6goeRglAI57epK6 xBrHg7ElrqFvUGp/SwdyfwZP+9WBZpeymbiBfDK3LnnSbwfIHcYI1YSDbx17GynEQ2jF kZ1IRszOtHnqEb85Cs52BMfh8AwDyQYZBD/R3Sbv0a2Bb96YBw8jj3n/UqKJWwi4Tw6R vGkcmOkskmYs4p6Y9cIWgbafzH37/ZiTPNU+ytWyNkKV1eYAlwwzmvQliH2RRDQL0POb 8FaSlSv8uqj3aPdp4aNLJEbdrOyCNDDc/TpNxpjqmL4xgiIRrxz8YrFBGT4JBiF+4ZBj 3Ubg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696522280; x=1697127080; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2EvgkhccdtLzTRFcaIrQ71LxkhfFWWESQuN+E4BNmU8=; b=LxD/wS/lFXZiQVQnQU+y0KlviANmYOfHG4uk/6ADKHSWRsqwV1+cHf650GF2Hdt3O/ 38bOjhLzdRGI9IPQIN53tXSrmpQG0vUPne2DHi6ZSp7IeOKXTnN3sIz/69HZwi26RCXr xPq35CbzUViZjFoSf8/cK4i4ZpBieJxeSbu/lpCD4aryAhqIi3mBeMLXQrjSDP75Tkb+ ToMuBVPoCRgaN748lPY0wnzoq6Wt7eef3z3ntHFf62kNvxJKeMAM4IPUAHxnxGbsUDTh G6oXMV2e8TbPlkyT/Tfqqie0STKwDr2O6tr4vXskXjoJ2cWFQR3XCVVeLrlITi0uKPWH 2I8A== X-Gm-Message-State: AOJu0YySZrSr5pG6Vp15UyvElMXTp6uQvd6xZCUtCDpGZ37NQcmc1tcQ HlP64HCHN3NAaPbvfwrULeOhXSx0HaDzkjYXkHBsVzjc X-Google-Smtp-Source: AGHT+IGhOh+UZAZ8uiJi3CpsaQi4N3ZXvalwQ+JWpqfMq1qIVTGRYUpgexrLM9EhdC0fwQYFBkrj3Eit8CtOKAAn3ME= X-Received: by 2002:a05:6512:1310:b0:500:b63f:4db3 with SMTP id x16-20020a056512131000b00500b63f4db3mr5308214lfu.35.1696522280141; Thu, 05 Oct 2023 09:11:20 -0700 (PDT) MIME-Version: 1.0 References: <20231005170349.GR1334@beffara.org> In-Reply-To: <20231005170349.GR1334@beffara.org> From: Daniel Littlewood Date: Thu, 5 Oct 2023 17:11:08 +0100 Message-ID: Subject: Re: share guix and its store between distributions To: Emmanuel Beffara Cc: help-guix@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=danielittlewood@gmail.com; helo=mail-lf1-x130.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.50 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: E7C9038C15 X-Spam-Score: -9.50 X-TUID: sNv/XHxSaAo3 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=E2=80=AFPM Emmanuel Beffara = 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, bu= t 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 t= o > 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 gi= ve > access to both distros. But it feels like a significant waste of resource= s, > 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 be= come > problematic if they don't share the store and the state in `/var/guix`, f= or > instance if they don't share GC roots. > > Is there a proper way to make that work? Or is it a bad idea? > > -- > Emmanuel >