From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 AKLjKUHPjGIKvwAAbAwnHQ (envelope-from ) for ; Tue, 24 May 2022 14:27:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id CL7yKEHPjGJ+YQAAG6o9tA (envelope-from ) for ; Tue, 24 May 2022 14:27:45 +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 218CF38D88 for ; Tue, 24 May 2022 14:27:45 +0200 (CEST) Received: from localhost ([::1]:33180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntTdW-0003SI-NX for larch@yhetil.org; Tue, 24 May 2022 08:27:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntT8c-0004HE-Tn for guix-devel@gnu.org; Tue, 24 May 2022 07:55:47 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]:36791) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntT8a-0004ma-SS for guix-devel@gnu.org; Tue, 24 May 2022 07:55:46 -0400 Received: by mail-lf1-x130.google.com with SMTP id bq30so30454693lfb.3 for ; Tue, 24 May 2022 04:55:44 -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=JcEXKzi1ExwcJwd6SJzdLVAZwtP7Y1u0JtcSp1bP2DQ=; b=miO/oB7HCKh0EshWmB32xqyRfrqUoIjqN4/3q0HwfRpLeWaYx4FQwoDg811cdcO74g 8LxRTsrWwH+Qf63N3PHRsLNaSarCkVUNMXbH31N4k6Q22q5+VPa3IZPaudF3R0J3GqrE dwJ3kdsFA3wKHlNRo/1qF59DAVufI3dbPFhep1ue9Apv0uPrHgs7ndTA6YoNobJrBqrC /c521xm/N+F5VMuPDiH342B5pYlJlfCIjQJFOXvlgroppKUBNqtdy6go+lC/9O0yWRq8 zow4yMyiEmzwB4Rkur2HUjj1xxOdWYZvf51iW+/TP6V+ywxHJpSg6hfcctgaZLo5uiVf 8AMg== 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=JcEXKzi1ExwcJwd6SJzdLVAZwtP7Y1u0JtcSp1bP2DQ=; b=GT4ItQXHXxLVj3BMbt3nd/0ppj/MITwIKsv6E8NS7/qJc7Q+YQnaVfxvFqC3jLJjho 3nrGqxq24BzbkHRbvFzbkz6jSnJZcovwKmgkabvqjifuiffdYfDysGW5OsLckzAQaqOP dDRg1yI1ns7JyTVdYWBAkQrsoRaDAUGfsBLY07LZqNsTJ5n3tqejfQy+ZNHEUIPLdfl/ OOWoudqqq5RuB+lSXnLr29+h0EnYTObR8rOW/9Y7uAA+6egcvc9gQsu9tkHjzzWVQIEr 9RHleaLDuqOrPUEj1Q/00+9fXs/4uwkcYRJFyWazuxIeobw5KdXsQrmud0KQciVMaIBt 4W0Q== X-Gm-Message-State: AOAM531UoHT9x4kKZUdoSB4sbUV9tv4wckEnYS6D71bUOyPg/n82mL+n HB2zrQoXLr5MLWjangrOIZk= X-Google-Smtp-Source: ABdhPJwBunsdXigATbXHmRYP/pn/bpjdKVoCGPLReUNdFxy2+l8UZjiL5jDuNfojqqjgmA9hrNEsfg== X-Received: by 2002:a05:6512:1294:b0:478:7f46:2ac6 with SMTP id u20-20020a056512129400b004787f462ac6mr4802408lfs.239.1653393342183; Tue, 24 May 2022 04:55:42 -0700 (PDT) Received: from localhost (109-252-132-136.dynamic.spd-mgts.ru. [109.252.132.136]) by smtp.gmail.com with ESMTPSA id m12-20020ac2424c000000b00473c87152bcsm2497778lfl.127.2022.05.24.04.55.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 May 2022 04:55:41 -0700 (PDT) From: Andrew Tropin To: Liliana Marie Prikler , guix-devel@gnu.org Subject: Re: Multiple profiles with Guix Home In-Reply-To: <7e70064d679274160d62fdc86e7e25879bec7a79.camel@gmail.com> References: <87ilpwpf1b.fsf@trop.in> <7e70064d679274160d62fdc86e7e25879bec7a79.camel@gmail.com> Date: Tue, 24 May 2022 14:55:38 +0300 Message-ID: <87wnebp2kl.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::130; envelope-from=andrewtropin@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, 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=1653395265; 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=JcEXKzi1ExwcJwd6SJzdLVAZwtP7Y1u0JtcSp1bP2DQ=; b=LpT1xvGKvN0QRE50SMZjqZUJK2XMdqh7V8dO3A5BAfQXAzQjGN0VZI+rudnJLR2p46JG+B I5uAYyehYxbjPiEyreNjzKnAEUGZ1HSTha47M7y9qGqbM1krXDRbVHRxEVEIoDCuHoFKBy KkrAk5+FAE6NGDURU+liBL2p1F6B4uzVKo2JNFtFSRBw96cylrRRDcr+y4zrM5UW8YFp6M 4HYL1foFaxpbgnOfA17Y/rcZXzGmxpDqHQxTbaeHKtFVTi3vOn3RyYKf2VovXlVUAnc8WQ wAcmFtIKZRunMiBNigXUDV7tJVtXTRU/kaxc289GXSY4ujcHIfoJeG2YUNK+yg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653395265; a=rsa-sha256; cv=none; b=rGkDwr8GUkMBmt2mOhnLOSyrjpTSu6YbfRhuEw/LQ2xkCGPoNU3b7wTei0O8RRBUGQVjTI 9iUT1Mk1/1455hElPCaWubvhrVwYua9TU/QM6Vvl5BFz+qNffFfe53lBw1pfJdetKrGHQq t/EmR6rosSzs2aMMw2DzK9uFCjoPXB9BoLAPNwAwvohe2lhfQKkT0/ipOkXAa/00Im49WU jOZvBcKSI+xq/PpW+k65RYec22nBJItQH502U+6A/kmYRdHrGiDd8pZ8198HKNMqtw8Qz2 5VLccwcntGWm9qzRYesW5Bd0wVtbiFfyHDHAfnCb9dtIS3rBvhfBpcmwJZX6Dg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="miO/oB7H"; 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: -11.44 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="miO/oB7H"; 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: 218CF38D88 X-Spam-Score: -11.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: +B5ofaGcxI8W --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-05-23 19:05, Liliana Marie Prikler wrote: > Hi, > > Am Montag, dem 23.05.2022 um 16:14 +0300 schrieb Andrew Tropin: >> The discussion seems too heated and bloated, it's hard to reasonably >> address arguments mentioned around, so I'll just post some thoughts >> and a possible way to somehow proceed. >>=20 >> I suggest to split the bigger idea into smaller pieces, play with the >> implementation locally/in fork/branch and see how it goes: >>=20 >> 1. home-profiles-paths-service-type.=C2=A0 It will allow to add code for >> sourcing profiles in setup-environment script and thus implement >> workflows with multiple profiles.=C2=A0 Such profiles can be managed >> externally or in the future built as a part of home environment. > How about home-profile-loader-service-type as a name instead? That > would imply that it's purpose is to load profiles. Looks ok for me. >> 2. home-[additional-]profiles-service-type.=C2=A0 It will allow to build >> profiles from list of packages, optionally add a profile to >> home-profiles-paths.=C2=A0 It will make ~/.guix- >> home/profiles/{emacs,web,etc} >>=20 >> To make it possible for other service to utilize multiple profiles, >> this service will be extandable with values like that: >>=20 >> `((default . ,(list curl wget)) >> =C2=A0 (web . ,(list browser-ad-block-plugin)) >> =C2=A0 (emacs . ,(list emacs emacs-cider emacs-modus-themes))) > I don't think I agree with this choice. To satisfy both my own use > 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). WDYT? > 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). I don't see any meaningful reasons to make it possible to customize the path inside home-environment. 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. I suggest either manage a profile with home-[additional-]-profiles or manage them externally and load with home-profile-paths/home-profile-loader. >> 3. Maybe migrate ~/.guix-home/profile to ~/.guix- >> home/profiles/default. > Kinda agree, but with the caveat in (2). Uniformity or chaos should be > a user choice :) > >> I still can see a lot of potential problems related to search paths, >> however part of them can be solved by duplicating packages in >> different profiles or using dummy packages like emacs-consumer: >> https://git.sr.ht/~abcdw/rde/tree/master/item/rde/packages/emacs.scm#L56 > Or by making search paths first class in manifests, as also discussed > elsewhere. > >> [...] >> Liliana, if you still into it, I suggest to start with something >> similiar to what I described above, share the draft implementation >> and intermediate results/impression in a separate thread and continue >> the further discussion. > 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 This one looks simplier and also independent from #1, so I would recommend to start with it. Also, it's very likely that home-profiles-service-type will be extending home-profile-loader-service-type > 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. The migration should be quite simple here. 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). 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 This way you can experiment with multi-profile approach even without modifying existing code. > > Given that the task has been simplified, I think I might start coding > on it, but I can't promise any particular deadline. At the moment, > both my day job and review work delay any other contributions towards > Guix. > > Cheers I also advice to treat it as an experiment. IMO Guix Home should be relatively conservative, stable and simple. Other advanced workflows in most cases should be implemented and maintained separately and be optionally pluggable in Guix Home by overriding essential services or any other way. In cases such workflows demonstrates their benifits without compromising simplicity, they can be included. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmKMx7oACgkQIgjSCVjB 3rAvaw//RKRwLQw1SgcY42tfO7HgEcLmn6/Hug0g4vQVBf3tevHFEuDmEIY2GX5x oATv2/melb0ETcbnBCvW8GVuMXpLdzpMU3hVzQb7fvkCtVi73Zvx3tVfxmQ7AOTF Q5ScGQ6EMLsa/3JP7y0KWYrerxZUmtT379sEhxuwdyVCT23NKKsrwGYDWde4CFys RPP0V07xdnxTyA75qaK/salwLmPYDOZuVWZ+Ll8m6VL6xcPrbp4sKYaL2nZ6a3Z/ JP9WngxSuPFNT7z3FPscSjRE3LzIHgbJdaL3Fq0JqmhCPEtao0hc8OLzW0K4gsWi rW4pYtBVdCuluW/b69WvhKYPIg3FmPfUcsJodU6oZ8qCFtUY/Mk9ro83or2eTxGp 1napj0H2FyC3gURiX4uTYZtLr6ec7tg5fabaM3oxLAahEaHhEEy/fExm+9HAQugB QVIdHx5nT7jkHsr9afFGW7oTFcJVoPl7hMvRaZEppeiVu9R9j82DtcO2++6gjiPs 7aZLQ2B80hbhpq/Jv0f861/cdIISQKSpwYoKqFRnYoRNRN7jzGnq9WTEXtzZ1dGs iZEmX0sz5AHurgYevrZxvwCQ5dE76bghhxbgc3Xe90Gc7jKtpO3CeZGSWFXY65ec T0aXgxuoK0DDzXIOzwh/kbvp6sJ4VZIWfxabt2/s+ydTMNdqGpI= =VTdl -----END PGP SIGNATURE----- --=-=-=--