From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4BDzAqw4cWL/IgEAbAwnHQ (envelope-from ) for ; Tue, 03 May 2022 16:14:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iKjqAqw4cWLBtAAA9RJhRA (envelope-from ) for ; Tue, 03 May 2022 16:14:04 +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 8C52223878 for ; Tue, 3 May 2022 16:14:03 +0200 (CEST) Received: from localhost ([::1]:41410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nltHu-0006tn-8j for larch@yhetil.org; Tue, 03 May 2022 10:14:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nltHj-0006tO-4T for guix-devel@gnu.org; Tue, 03 May 2022 10:13:51 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:50981) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nltHg-0000j4-VF for guix-devel@gnu.org; Tue, 03 May 2022 10:13:50 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 619F620004; Tue, 3 May 2022 14:13:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1651587225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rv9IWzPhiTpG4a7HgdGeyS5USVpuKnAyR/59WfgynKI=; b=cOjbP9uPdAe9sxp8VWM1RjO+J1aBVWkSPzlD9ef5fKYOhJ6isegrH/yeY9t1NwIReoBGCP CmN+WKPTYZFMZw6nac9OuEV8p9xVVjJqy6TdpXSGjQymJ2+yimckqQLDUikAb/USldJNfI yYrXkTfw6VFjDg8QJ+JASTw9GAC8G9J/hbpu+XSLwBOj1RA1w8j79JAdHio7iPaqFlEzqV GXZ+x3xWdZedoL2lx3jsgjFQbFoXBI/I+eN3xvBLf04hS5PR8uNyOnleXEKU3+Czio1cLm 9TM6sSlMtqfuvGLiimgqCxLB6q85j5rrdB72BrQme3EEcpYBg67kx6/ZquHT5g== From: Andrew Tropin To: Liliana Marie Prikler , guix-devel@gnu.org Subject: Re: Multiple profiles with Guix Home In-Reply-To: References: Date: Tue, 03 May 2022 17:13:41 +0300 Message-ID: <8735hqvh4a.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=217.70.183.200; envelope-from=andrew@trop.in; helo=relay7-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651587243; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=rv9IWzPhiTpG4a7HgdGeyS5USVpuKnAyR/59WfgynKI=; b=VUTb9QpV3DvAePPXAhdeeVLKtPxCo+FY6E3QoBBaaubcrflqidVkNYtuTG82Xu/G+qkeYs 3FcwrAiTekt3KtxF2EvCiaTGyKq35KSv1q4qAcLeXTESqsjKiYMHzuH4s87jKVMYGeI0fV zobxtMuxt0fIj9y2prA2vaSCZEypobe1iFQUMN/fxrpM0xzo2MwI6BGdJ0urzSCQlQ3sVj wH/yy9dYe4DdDWyPbp3EASQfAHnTrxQTtUNOWk4WeDd1tSfiJ+dNYZy6bgyype2qL/2jR/ KqvfePcUbW0v0iTonttzJghLBmjWE77d9xG8f0O7sxkVvsx2y5UA9WkuNvRPAA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651587243; a=rsa-sha256; cv=none; b=Y7Gk5PFLTJCiBmaqkRSI82/MZbvl4eTM1geInFNEVQip93sDF4qOJsJYI1vCoCnqs9tvBj hvim/U40e8J09zbgC1Ol29vA7MC7Dyyd9psEj+q/9z5ox/zmtidUC0RUae0QkOTRLhNEB1 s9/g4m3UI6H0Td8tIsOMGTSb0JUctRjNoNy8QJ5iH2d3YcIVUVZSTcMOqSKXYx79CKmW43 jst7OOsIeMXaIUMu8/wsa9+44QHSUn5ZbAd9yQzLBGBkacRWo68L7QKqUXKGLN8I+ZxFr7 V7O9PBnd/+k18yfVYj6IEHyrGYUhBF5sYa1BenqJZLY7XC0snK3/bF3jPhL06A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=trop.in header.s=gm1 header.b=cOjbP9uP; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.28 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=trop.in header.s=gm1 header.b=cOjbP9uP; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8C52223878 X-Spam-Score: -6.28 X-Migadu-Scanner: scn0.migadu.com X-TUID: GovTEwJF/9WX --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2021-10-03 12:50, Liliana Marie Prikler wrote: > Hi Guix, > > it's been a while since the discussion of whether or not to collect > multiple profiles into a single directory [1]. This suggestion takes > inspiration from that, but goes a vastly different route. Instead of > using environment variables to control Guix, it takes advantage of the > recently added Guix Home, even if it is still a technical preview. > > So, what's the proposition? I suggest we modify home-profile-service- > type (or add a new service) such that it takes a list of =20 > records instead of a list of packages. This record would be defined as > > (define-record-type* home-profile > make-home-profile home-profile? this-home-profile > (location home-profile-location) ; string, e.g. $HOME/.guix-profile > (short-name home-profile-short-name) ; string or #f, if given > ; construct a symlink in > ; /var/guix/.../per-user/ > (manifest %home-profile-manifest) ; or #f > (packages home-profile-packages) ; list of or #f > ; fallback for manifest > (enabled? home-profile-enabled?) ; boolean, default #t > [...]) > > (define (home-profile-manifest home-profile) > (or (%home-profile-manifest home-profile) > (and=3D> (home-profile-packages home-profile)=20 > packages->manifest)))) > > On init/reconfigure, `guix home' creates/updates all home-profiles > which have a home-profile-manifest that is not #f and links them to the > appropriate locations. It also creates a shell startup script that > loads those profiles that are enabled?, even if they have no manifest > (this can be used to e.g. declare a pull profile, which `guix home' > can't manage).=20=20 > > Some existing home services would need to be adapted towards this > multiple profile usage. For instance, home-fontconfig-service-type > would need to accept a list of directories, rather than hardcode its > value. > > What do y'all think? > > > > It seems doable, but not sure about costs and benifits. Also, cross-profile package installation can be error-prone, for example if user install an emacs in main profile and emacs packages in emacsy profile we will end up in a situation, where those emacs package aren't available in Emacs. Probably some other issues will become clearer during implementation. Another idea I have in mind is to make such profiles (including guix home's main profile) detached from ~/.config/guix/current. For example by providing channels specification as a part of . It will make it possible to freeze a costly-to-rebuild profile at a given channels revisions and not to rebuild it, when the main profile and channels for it get updated. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmJxOJUPHGFuZHJld0B0 cm9wLmluAAoJECII0glYwd6wIaAP/3JyMB+56u1zuoS0qoD7FJMn7FF2eesV88bs X4uy+JcR9xpOc7QaeA5nK03xXq5rQT4/pALAIbq+OOsezXYqr+1bZDmvpF7/Hozh hqep7v9VP64v4mT1Eh5NC5b24gbpZlTq4kAXYi6NMoLsx7Nun5F/AvHTjUMA2qXW BRYigd92AsyjOfggOjPYDOL7Wl/yvP7B90oaTOB9wU1uuvvWR29+jG6GkF3swcLx 6MScdfuyf7/zS8bQhgmY6BQI6/DNkyFtyec+ehNQiazXZ/Ia8WfIpjZCwhS9UXGP HL2sSK1rnppycvS/8RJHPNdbTKyyVK1bOOxDvQKNzGqJAmehxFJT6jICaF2hv7bC K2UJTILEOf36niqP7pfJSjXe2rqC15K9YM1xv5iNqTFrTWfDZVABuJOeaajdhgve aM8MgMbFr8XTk21lj0wNsS6biTvZ9demm8grhjU5hGqM3LWR7jrkMUTQU+hRdLCE wGOUsXPcgkDrpjgdsvTSnK04vrXAaivozHWnhUrgLb05kXZkerdLMTrzzcOd7+fn /xtKGndxK9B3Bnqf3QnPBtdtp3kGPBhdkksz3IqTZe6d4Vz5vMrx/VhyyMZZzVtF jB45z2M1rUNJGxEz16IUodQ4i3uNb47h1cZfn9wrBvA6Sdj4VXEbuW2aFpCgNM91 EyHaHzRr =6oA0 -----END PGP SIGNATURE----- --=-=-=--