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 ILb/HyCTi2KsYQEAbAwnHQ (envelope-from ) for ; Mon, 23 May 2022 15:58:56 +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 OMDTHyCTi2LRFAEA9RJhRA (envelope-from ) for ; Mon, 23 May 2022 15:58:56 +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 222F62ED05 for ; Mon, 23 May 2022 15:58:56 +0200 (CEST) Received: from localhost ([::1]:40200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nt8aF-00053b-0T for larch@yhetil.org; Mon, 23 May 2022 09:58:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55132) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nt7tE-0006bF-Kq for guix-devel@gnu.org; Mon, 23 May 2022 09:14:28 -0400 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]:34408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nt7t1-0004ti-VX for guix-devel@gnu.org; Mon, 23 May 2022 09:14:28 -0400 Received: by mail-lf1-x134.google.com with SMTP id u23so25536386lfc.1 for ; Mon, 23 May 2022 06:14:14 -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=s555/K2afLcN+YqGBLzDK/5Rs9E2GkRZrRnDKLZ/QT0=; b=MGCWXD9x+WnSdAgXsGJi0s6JZGB9AIXTZEU8yjSlW7Psjp/Awz3N9c+F+FZ6jZI0h3 FyB+AS4lSnBCTUynu+8SJxj2A3fU966oEhKzpoCi0l7DYO2s65EAgla/mpNcXRinXBDt JuOxhqBtGa3e2pHCIqGGsOBFab+mDKVxdquvAC0yoXcuJ/z39rqkFu4wF1VI2J3ZTahu q0wJ49bPdinnxJI48HzVy0QAbj3zdxAyZDcpyLvivc7lP00Z2f3f9L142rSGH579hRrk ghVpmo9Tcc6dWbjv6OpukF5MBIej5ot50QGugRPyPzy+cOXK6xASV3seTC2IZ6hrMfmI ECRQ== 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=s555/K2afLcN+YqGBLzDK/5Rs9E2GkRZrRnDKLZ/QT0=; b=8OmFJeTwc5DS1uNrWy7kSo6r8WyelEyzNyBzsTAybIUF/Gm4PRPzKy/YMt7ixnelqP 9sUYn9lAwqpzPFlluHv/1c6Pcz4IgxrcLbeKVXcyIXVq8HS15cCHnVmQihLoe+IUCGtC lX6zMuhLUE8w4asYfNir8FJIXXnirNm0snRx/RdbT0v7auoQb6Rzor3XS6CWMrDsZKTZ Vc0VCBF2qkz/mkyYse9R5i2VhIcw6DYbffxcpjSh/fUoqIJGQy34j2hEUWN2DfQjBd+6 7QEt4h1qU0dSTWYmiRqohaKPBYQLQXUNgdBVGVwoJq85KNKt2dspgJv0IGQRHrm4wQzr SoIQ== X-Gm-Message-State: AOAM533roZmMC/UCq8EjXK0Rn5Y+Ug7Amon/ZcCySMGicEnwyZEkmB0v X0kXFWZAIoy+v1TzZz9z6sE= X-Google-Smtp-Source: ABdhPJyrEDIcZSKLhUkf2dcdtfCzgPq/DzU6sW+BVRZvNw5i9RzCT2zhfn9ggvpJe3bFvSz1nJds7A== X-Received: by 2002:a05:6512:e86:b0:478:6841:2c9d with SMTP id bi6-20020a0565120e8600b0047868412c9dmr5947451lfb.560.1653311652241; Mon, 23 May 2022 06:14:12 -0700 (PDT) Received: from localhost (109-252-132-136.dynamic.spd-mgts.ru. [109.252.132.136]) by smtp.gmail.com with ESMTPSA id a25-20020a056512021900b0047255d211e7sm1966036lfo.278.2022.05.23.06.14.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 06:14:11 -0700 (PDT) From: Andrew Tropin To: Liliana Marie Prikler , guix-devel@gnu.org Subject: Re: Multiple profiles with Guix Home In-Reply-To: References: Date: Mon, 23 May 2022 16:14:08 +0300 Message-ID: <87ilpwpf1b.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::134; envelope-from=andrewtropin@gmail.com; helo=mail-lf1-x134.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-Mailman-Approved-At: Mon, 23 May 2022 09:58:39 -0400 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=1653314336; 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=s555/K2afLcN+YqGBLzDK/5Rs9E2GkRZrRnDKLZ/QT0=; b=mNcaY5TM4Pgmfb9bH7uX1Wo3Nf5AUNyRTGVYy/lpp02FKpHJo1Leg2Wc4BHc1R6pPHlTRl s+sO7Lq/pXifmR9mvVw14fhTJuPaMAFq47x1N3gXpkQ7E/ovtzM5YITrIpeji2W20k43fO sakj54ImDLlxc/qF42I1AJzDTVPsgsaPvdjPNsEFylqqVWJGpZ/ujWBi45+O5BgNI6Du36 NhFkxbBK9zLn06XB5esEfYoOXTTeO9SWrlldViy7coz+HRwrO7ieCrVxSk73BaKqUiXpLn 26dZ9mLEFA//vw4usRG9FkEvvzT9PtY1hHNLYKu8tTjQnx1MiypKwIKNw8kchQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653314336; a=rsa-sha256; cv=none; b=awLQqOOZmo8Uu8f4rUpdcJVkQqp548ciCvrSwPC04JsBlEHuYNCShlcr9XMWrfROoQS35M ELeH0qZiXBOpXW2lxWeqKLMmh0pf+07IFeRnNLQqRCCIBHYNICBhgTx/x44YX7/IGp6tjK AQpeuoTmgPvAnN87ZVItepBB9d+1omgrs9Bw2IIPPvz5pTFoZ5foLIDMyYSbgrZcInYLGy N8zRZgYB5TCHDhUOZ7na3TN30P4225yakwOXTdt0HE7EvsdkzhCNn5ZZmbR/vYCFm0onAF 6s4/NwznYLgMLHIZ25NOF+Loz2Lan0ftGO4nUf4nkfzyDgg3T5fGnx9NsyRQuA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MGCWXD9x; 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: -9.15 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MGCWXD9x; 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: 222F62ED05 X-Spam-Score: -9.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: ElaoJNR475DH --=-=-= 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? > > > > 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. I suggest to split the bigger idea into smaller pieces, play with the implementation locally/in fork/branch and see how it goes: 1. home-profiles-paths-service-type. It will allow to add code for sourcing profiles in setup-environment script and thus implement workflows with multiple profiles. Such profiles can be managed externally or in the future built as a part of home environment. 2. home-[additional-]profiles-service-type. It will allow to build profiles from list of packages, optionally add a profile to home-profiles-paths. It will make ~/.guix-home/profiles/{emacs,web,etc} To make it possible for other service to utilize multiple profiles, this service will be extandable with values like that: `((default . ,(list curl wget)) (web . ,(list browser-ad-block-plugin)) (emacs . ,(list emacs emacs-cider emacs-modus-themes))) 3. Maybe migrate ~/.guix-home/profile to ~/.guix-home/profiles/default. =20=20 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 Also, I can see potential complication of Guix Home in general due to multiple profiles capabilities and I still not sure that it worth the benefits mentioned below: I agree that multiple profiles can be benifitial for both better package organization/structuring needs and faster build/reconfigure times. I also see some demand from people requesting such a feature. 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. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmKLiKAACgkQIgjSCVjB 3rAF4A/8DAJXnFnlmDuI3lO/0L3PcUzZRv8HilqtArhl6hURkMIzox9Qhg0g8tz+ fLllQOBgtc5hXdDbRXTm/AeihIZvfMU/CHBXfStgnLuAFOG6hwz8LxuSkbcVEoU6 STgO+W1RMy8qH/OrTRAlEh8hTv3LCM8EHiF8gqGhLjY/LpYR+TvjQPZiqNUG4n/B JpQvp3YE/sgYCydua0xtmbByD4k7UVeO6rPpBsFDV7o9MeLXwOg+jaRLfxey63GN RYCYWi0FAT0tasYv2HiM6F16SGFbOd77YuFRIjzgptsslT0pMt9nDMEYy8A2VAHv jgH6em48c5o/Eq0+l19B3XA0sq0137DiQEPXyGYGRQm5jUF1yuJ1JOaqsytGBPMi PZvY7UjYNJiUvGESD9tLabxIrZyVfFVaMjfteAMHLpHW/2xaHd6HhYzLtok9FNzN FDPphCQ23AQsnyVmq6K/oE8SioTnhYNN0IX6UDlOWoAF2f4BuOt8pj7f7wtbvD+j edUwr9j/JLA2DdgGvhaW3XyJyPvJkZ15y1k9KKEKDedhVk1FtgudfFJdCrik2P1J B2BDAEo0KR5f2zkl40Va4EJWFv0E9LPHLYeBUS4P44pQ8T2M98zBU6xVt8cXE5VS xT+M5Vi3MRZUwnoz25Bk/P7n4wD2apDYzkRrTqJNHUEHy8Vw8BY= =okhu -----END PGP SIGNATURE----- --=-=-=--