From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iAbmHL4OjmLiOQAAbAwnHQ (envelope-from ) for ; Wed, 25 May 2022 13:10:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ILPTHL4OjmJTZQEA9RJhRA (envelope-from ) for ; Wed, 25 May 2022 13:10:54 +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 F09E6E8B5 for ; Wed, 25 May 2022 13:10:52 +0200 (CEST) Received: from localhost ([::1]:59058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntoui-0003NH-3g for larch@yhetil.org; Wed, 25 May 2022 07:10:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntole-0007tm-6Y for guix-devel@gnu.org; Wed, 25 May 2022 07:01:34 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:34575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntolb-0005Wh-On for guix-devel@gnu.org; Wed, 25 May 2022 07:01:29 -0400 Received: by mail-lj1-x230.google.com with SMTP id m11so12607633ljc.1 for ; Wed, 25 May 2022 04:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=S7oERbmL22lzJKpXrlsnsGi55HCqHu4RmkcA6mA4JIs=; b=hxonzABnxOkw6KvQp3tRPZ+ZqAUthLnDSrTEujfATsvFG+zPdSFDyv/NivnZ6AyMvF KpfHPMFjAf9DS1MDOYJZGA9oPOw8nQfz6RE8aU/CtXvxwr8gCY+HOlgelWn4zwJzrThG /WbqvP3LPwQFqdY/6zvN1nBpyHOao1PejYfdlXm6c3/AHgrzh+JD+fhUjdTNo8YJO2Ax HTmibsrZL8sKME8GCfIoelv7TBpW90QhOvJkaqKEFx9uAQQp3sr8KoOaoD1zviu6+O/n U+VtNNLGPBN88KqRoyKFN6O4hFoqCso/JWbfrpDvszFTHTr11HFOFnjbydyn63/cT3ix TG5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=S7oERbmL22lzJKpXrlsnsGi55HCqHu4RmkcA6mA4JIs=; b=E7JfwObqBYRPVFLDzN0wiQnAtwGgBNLF9UvrutY5LcaLXqeuYt+uiOwtbj7MzVeaE+ z8I2IVP5803iQfvuTzmC/h9U2v9+Ndue+4i3t99rr0J17Ipo4ZVQN8kMuXQbbEl4FbNr 9W+UVfZsaReVFtCciWUjcNfTGUhlYtp7+goQc9j2daYlJtQtM8otKUTkPBB26l12aGU5 9ZAzPlATdjh99sbOIXPjemX33HCQ2LQqTfwrP2woUqFv1u7jtQRh4AGSSe/AzX8DPQux y15UXKXRazuzWFugrSA7DchtdBD1Karg4yIaIoxN+spbQo3N+YTdQNIBxLNBMpE0G0dt hB4g== X-Gm-Message-State: AOAM532em2+GmhGpKwhxe9EK8jgXAoMRBdbDpUfv9YPXStOzE+mCh1de aFfmWrVAE0a62vDaxf/gJOs= X-Google-Smtp-Source: ABdhPJyPhavfCzADkMvLcZULBShOhvu6WlIF79CJk7NSaEnJlj5DfrW07aM3uOeyAPztf4qShKp9fw== X-Received: by 2002:a2e:8710:0:b0:253:e064:fc77 with SMTP id m16-20020a2e8710000000b00253e064fc77mr8061513lji.133.1653476485575; Wed, 25 May 2022 04:01:25 -0700 (PDT) Received: from localhost (109-252-132-136.dynamic.spd-mgts.ru. [109.252.132.136]) by smtp.gmail.com with ESMTPSA id j4-20020a056512344400b0047255d211c9sm3045566lfr.248.2022.05.25.04.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 04:01:24 -0700 (PDT) From: Andrew Tropin To: Liliana Marie Prikler , guix-devel@gnu.org Subject: Re: Multiple profiles with Guix Home In-Reply-To: <31aad8f29ff43cc27432936227aa7c8edff76265.camel@gmail.com> References: <87ilpwpf1b.fsf@trop.in> <7e70064d679274160d62fdc86e7e25879bec7a79.camel@gmail.com> <87wnebp2kl.fsf@trop.in> <31aad8f29ff43cc27432936227aa7c8edff76265.camel@gmail.com> Date: Wed, 25 May 2022 14:01:22 +0300 Message-ID: <87wne9q3jx.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=andrewtropin@gmail.com; helo=mail-lj1-x230.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, 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=1653477053; 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=S7oERbmL22lzJKpXrlsnsGi55HCqHu4RmkcA6mA4JIs=; b=lwqy3uW6cQxrUCtltfNLJtiba9PlKrZIDNyzgXu8DJuZXZjhe3yRuk3sRtLQz0/8QOQMXu kk5TLIwYXvqiIVhyAwKQXGbFoaMT96kjE4+Iw209IbWn6i/GMH7iYnlKQ1BPBU69NQm+sz s5AkgPT2IVDeLM/wWejNpIECmM+1x826ZXlxtFJC4dZJXMwMKdfvs/zHXo5geBTVVwhlMy +lDp7UE8lLZqveeRHb+DboUrVo+HaruUgVfuNTwDAYcKEguxZ6/5/eFMkWefQaoQ4+tuEB eJgMejm1Xk9vYoJhjxFYUTcKiOS25i3Pya61s6aCovYuOOnSMHXsC2F9al09PQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653477053; a=rsa-sha256; cv=none; b=aozTeCu5uSmPMd3H1+4QeD1kdku/LBI3Uc4B/v9SH/dfT6F4wXo1ABhgWRN9KhUpKveCL3 qljgmmGcpnUt8yor8InQz4wgu/l4oXNt5bINDu95bb3KZrFpFGcyq9ruYqzxW5FqehfKhN vmcO+P1eoKw/ph2ETvF4yD9t6TDKuomwZUhcYwe0oChxYAWMNy70Af/W0NBmnsUzIybW+r gIRtFmrSM8nSGVZDZpHT87ZBPE797KGxmqvuXXbhheiiDgUiHupegK/jEoV9kaBkpwyHEt OINjcTuiGwRkHoiQWaLwY3WL04VHpGSvKxMj6qiYt9Yc28Ff7g+D4IXQxCHfTw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=hxonzABn; dmarc=pass (policy=none) header.from=gmail.com; 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: -4.64 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=hxonzABn; dmarc=pass (policy=none) header.from=gmail.com; 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: F09E6E8B5 X-Spam-Score: -4.64 X-Migadu-Scanner: scn1.migadu.com X-TUID: vAOLexZMHYwJ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-05-24 20:31, Liliana Marie Prikler wrote: > Hi, > > Am Dienstag, dem 24.05.2022 um 14:55 +0300 schrieb Andrew Tropin: >> On 2022-05-23 19:05, Liliana Marie Prikler wrote: >> > [...] >> > I don't think I agree with this choice.=C2=A0 To satisfy both my own u= se >> > case of serving profiles in different locations from another and >> > another issue being raised w.r.t. configuring the location of the >> > .guix-home profile, I think we should make a triple of location, >> > optional short name, and manifest (which may be generated from >> > packages implicitly).=C2=A0 WDYT? >> >=20 >>=20 >> This service is intended for profiles managed by Guix Home, so every >> profile MUST be a part of home-environment (~/.guix-home is a symlink >> to it).=C2=A0 I don't see any meaningful reasons to make it possible to >> customize the path inside home-environment. > Why though? The decision to restrict Guix Home to dotfiles was already > a bad one that has since been overturned, so I think we should > carefully evaluate why "~/.guix-home" even is special. In my point of > view, any path that is prefixed with the user's home ought to be fair > game, as should be constructing intermediate per-user profile symlinks > in /var/guix. It's not bad, it had and has its own goals, pros and cons, I found another design descision, which we think is more intuitive, but still partially serving original goals and we switched to it. The disucssion about ~/.guix-home symlink itself is unrelated to both "dotfiles question" and my original statement. All dot/xdg/other files belong to home-environment and no side-effects are done during the build of home-environment, the only side-effects happens during activation and $HOME touched only by symlink-manager and I would like to keep it to be the case, otherwise we will end up with tons of stateful ad-hoc hacks. That said, I would like to avoid any Guix Home logic to rely on paths outside of home-environment. In case you really need ~/work/my-project/guix-profile to be created for some reason you can extend home-files-service-type and rely on symlink-manager to do this dirty job, but the setup-environment script will still source home-environment/profiles/your-profile-name and won't know anything about ~/work/my-project/guix-profile. >> If you want to have profiles like ~/work/my-project/guix-profile or >> ~/.guix/profiles/my-python-environment managed by Guix Home you can >> implement home-external-profiles-service-type, which can extended >> activation service or any other impure tricks, but I would advice >> against it.=C2=A0 I suggest either manage a profile with >> home-[additional-]-profiles or manage them externally and load with >> home-profile-paths/home-profile-loader. > Pardon me if I was confusing, but I meant to have one service defining > the existence of ~/work/my-project/guix-profile (that being home- > profiles-service-type) and another to load it (that being home-profile- > loader-service-type). Admittedly, the existing way of specifying a > profile that is loaded becomes more work then, so perhaps we can add > some syntactic sugar to that, so that both services get extended at > once. > >> > Considering the above, I think a rough roadmap would be: >> > 1. Implementing home-profiles-service-type (to build the profiles) >> > 2. Implementing home-profile-loader-service-type >>=20 >> This one looks simplier and also independent from #1, so I would >> recommend to start with it.=C2=A0 Also, it's very likely that >> home-profiles-service-type will be extending >> home-profile-loader-service-type > I thought about it for some while, but I really don't think either is > easier than the other, particularly in the way I described it, where > home-profiles-service-type and home-profile-loader-service-type are > orthogonal to each other. > >> > 3. ??? >> > 4. Deprecate the existing home-profile-service-type in favor of the >> > new profile service type pair and/or implement it in terms of it. >> > where (1) and (2) could be done by two people/teams in parallel. >>=20 >> The migration should be quite simple here. >>=20 >> JFYI: The design of Guix Home is flexible, essential services can be >> completely customized, even symlink-manager can be removed or >> substituted with something else (for example to make a read-only home >> workflow proposed by Julien Lepiller in guix-home-manager).=C2=A0 This is >> also used in rde to substitute home-shell-profile-service-type with >> alternative implementation: >> https://git.sr.ht/~abcdw/rde/tree/master/item/rde/features.scm#L234 > I'm not sure if I'm that fond of this design choice =E2=80=93 it reminds = me a > bit about OOP horrors I was forced to learn. Anyway, I don't think > it's relevant, as... >> This way you can experiment with multi-profile approach even without >> modifying existing code. > I was planning to run guix home from checkout with $HOME in /tmp anyway > for testing purposes. > >> > Given that the task has been simplified, I think I might start >> > coding on it, but I can't promise any particular deadline.=C2=A0 At the >> > moments both my day job and review work delay any other >> > contributions towards Guix. >> >=20 >> > Cheers >>=20 >> I also advice to treat it as an experiment.=C2=A0 IMO Guix Home should be >> relatively conservative, stable and simple.=C2=A0 Other advanced workflo= ws >> in most cases should be implemented and maintained separately and be >> optionally pluggable in Guix Home by overriding essential services or >> any other way.=C2=A0 In cases such workflows demonstrates their benifits >> without compromising simplicity, they can be included. > I initially planned for the new stuff to be backwards compatible by way > of sanitizers. That probably still works for the design we have > currently, though YMMV. Let's get some initial implementation done and will continue the discussion on more real-life examples. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmKODIIACgkQIgjSCVjB 3rBu2w/+MCwJBgVK64WNRFptP/++wZHc4iefoXL9d6cYAVL8mjQ9WljwSoOTuBvX YPgf0qQY5jGzPDLrIliJuk+f03OKSseDV7uVmo9cJ/dhJHqkkfPu0XSdbvwsabgo 7wE36eGIi10M6d2ReSgG1ml0UYCAT5PyaQLN/mrX050MH5PvOGyZKrjYnSpBhXGO ZA7tYLfSUhI8EaERdR4+s9Qk7ADMrmtrNffbsgkjcAe8CqH2AuAeEVBiiuAVBSCR 0ogzQL+tCLfFgtaTEElCCHvY8aEg2Aaax7vJKp/gnPRQaBxondKE1a/OVXV+GnNf RkYYrobt6cpwg24JysAERTzfzRc51NTXNFht0WM43ef07H1gV9QTw0T0l8AP8d6j IhLYf0gHTdjLuyfNlVrJdRNTWCUBTnI0CyheAIgVCvS+w5eXhQo2z/NoRcaYPW/1 2+slt2N4XDBUIeucCUyh+v08NUBH8glxl0+ICcW90OOEG8b2E0gg/hB7JaZz6QE7 dKAs2z7FDbMvhTm9yhQW8ceMcqNu/TVe5Q/RWxVtTqDr2zkegdnB8gfCEdafaEAz XgdHEytXjvU5/9DYfFpojciH3Qh6cYOltDsdE98WAZjo+NyAbq0JXvdH6Ib8HzxX /GCWErflvza23CDpN0pyl84JpBzwQcJPF/vUSaQ5gsKuI6aiFwk= =CHyD -----END PGP SIGNATURE----- --=-=-=--