From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 iAp6IN11cWIzLwAAbAwnHQ (envelope-from ) for ; Tue, 03 May 2022 20:35:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SPhiIN11cWJNMwAAauVa8A (envelope-from ) for ; Tue, 03 May 2022 20:35:09 +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 0AE09DB2A for ; Tue, 3 May 2022 20:35:09 +0200 (CEST) Received: from localhost ([::1]:35610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlxMZ-0008Rz-On for larch@yhetil.org; Tue, 03 May 2022 14:35:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlxMB-0008QV-9R for guix-devel@gnu.org; Tue, 03 May 2022 14:34:44 -0400 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]:37714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlxM3-0006wj-Fg for guix-devel@gnu.org; Tue, 03 May 2022 14:34:39 -0400 Received: by mail-ej1-x641.google.com with SMTP id kq17so35073609ejb.4 for ; Tue, 03 May 2022 11:34:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=+j9yxKsbfEM9a3lZIPRzwaxv+/K6m8AfPfgJGAChofo=; b=gleCR3ijMDqu6MCI9yiLxEzuBQZiby2C03C6wAI9WiEk707G2WSSLc4Jq/MIRrOTeU bynXnSv/D0uuD50vSOZ2WXDARmUAnVd5XWt3wILnuaZV1uZtuh+oapk6vsiSeNN3Jhjm /FKMfr0nhdkALODo2gp3dK6CLG1z//wWYfTI5n9xBgnYOd13YI65ve9u0AkNhpFzDot2 duXW2kBtWl6/yny1C5EulmzFeyxR5V2evVfFVlfFPVz0PQ/Zth3JEGentVWmLOrEBGUh w3u9IZSqe5ovI3RGkONgzV9s1LA29aM0fdx3wlUJOrlLlc86kFsLAW/iMHT8KbcefAKg Q8aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=+j9yxKsbfEM9a3lZIPRzwaxv+/K6m8AfPfgJGAChofo=; b=mS7b5rZSn0ggmQf2Izjmwkn5sDgZcwgiGudu7QdgHlsTtvhtdKhnNaceuU5rYkht8c W9QElo9tfkiVQd4DJLBWwdSGeCvebSwcrveVgOGIinHASwa6mMcDPodgdZQQzfkaD08K Nzr0JVuca0J0mfzjWephmCTrOy5uRQBJckxzY5Q1hBFsbb47SSfM4OK25pwUfGSbFvfB P5p+y2N0FKYCAmv2RVAS0WLVLVGzh5gY90kw+1MEnL/ytvyIu9txRvzyC3ZcnGO/K4HP oK2izRA/9Zr3UcuaGOyjTOH89b1ZohROCsXNxpJKnyWZ+nOjhYNwH5DN/frU/COk6Wl5 PvMQ== X-Gm-Message-State: AOAM530r16q8mbzO0AdUsTkn9YDD9v/GaMNOrOLhbLdfCbQWyBwR46oe 4JHE1kN86QtXnOK7IvhRRPoB9YE10Gk= X-Google-Smtp-Source: ABdhPJyzYEUg9/JWW4Zzjkk87nOkA4zlbpMuvXga2LoVgy7Ym3mcTxVGwNiP5d9IPSpkvmQk9Q9zrA== X-Received: by 2002:a17:907:6092:b0:6f3:9d63:3b45 with SMTP id ht18-20020a170907609200b006f39d633b45mr17852312ejc.703.1651602873491; Tue, 03 May 2022 11:34:33 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id yl15-20020a17090693ef00b006f3ef214da9sm4961878ejb.15.2022.05.03.11.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 May 2022 11:34:32 -0700 (PDT) Message-ID: <8a42a0c84d35231b360a421fe0b846c8e1aa3d2c.camel@gmail.com> Subject: Re: Multiple profiles with Guix Home From: Liliana Marie Prikler To: Andrew Tropin , guix-devel@gnu.org Date: Tue, 03 May 2022 20:34:31 +0200 In-Reply-To: <8735hqvh4a.fsf@trop.in> References: <8735hqvh4a.fsf@trop.in> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::641; envelope-from=liliana.prikler@gmail.com; helo=mail-ej1-x641.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=1651602909; 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: 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=+j9yxKsbfEM9a3lZIPRzwaxv+/K6m8AfPfgJGAChofo=; b=tqvwRag7jXOXrP7BnQIuttu5mlnsylPxdZj4ws3DbgCs5uphmH5/FDoo/MQsivlm1J3Gqm f5vteoWJsddigmiV9Ztah+vK0wrrr+1xcvuqPjJA7irgaX4zs+a5VFp0DdgePua0I6OdDm 5aRYkaYA31dRfEecFm3z8XCGhaymQK9EN1YZRIrqnZgjkyP36YWNr3Y9X+5eY9w9RwUH9x zm1yky2fykmBX0oIrGN8qnGliSggpRnr2lDonnvObp+GPsJ7K2vHKCYO+amy8+f4nRDzBy yrqeFvfaEcxIfrM/Q/MF8gwKHwxQ1nJKYL8f5drEuNtumtf8j6Y6WEAYPklbDw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651602909; a=rsa-sha256; cv=none; b=B1yP3fPrVDvkierwP+nDyohqkOTWOfAHcpx/kCx3+aJzUIPiMrN9HdI6lwpzn5QFNiOVfK AQIODmyE7jruIRzhzQBxkVgDraUH28h7GkH4JY9+ijZ7NUTBxu0EW7j6xuHT7dRtBUuaps AY1ns047PmRwKpFEnIA8gE9FQtsZloqp0Ith/FUcWu6xK84HedJOyp9P5zQhYR90tsjuwC OxngBE+rBBcWS1HANbQl1YBORs1b6Uppvzh3FbT0gZwFfYgiRAWHADP9ykuHZEvfAzowbs Tna1m+1XZae+7FxM12zSW0qOjSdwFmIsyTsp2h/GggggqVoAOrEywd5pbGQ3ug== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gleCR3ij; 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: -3.97 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gleCR3ij; 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: 0AE09DB2A X-Spam-Score: -3.97 X-Migadu-Scanner: scn1.migadu.com X-TUID: rtUDTOgVTY07 Am Dienstag, dem 03.05.2022 um 17:13 +0300 schrieb Andrew Tropin: > 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 > > 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=> (home-profile-packages home-profile) > >                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).  > > > > 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? > > > > < > > https://lists.gnu.org/archive/html/guix-devel/2019-12/msg00358.html > > > > > > > > > It seems doable, but not sure about costs and benifits. Glad I have your attention now :) Depending on your use the time spent building `guix home' could go up or down. If you simply add more profiles to it, that'll be an increase in cost, same if you don't make use of the feature at all due to the time spent field sanitizing. If you do split your home in multiple profiles however, you will benefit from faster union builds, which themselves have quadratic complexity as a lower bound. > 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. The solution to that would be evaluating the search paths over all enabled packages. However, I do think it's fine to do as we did before for now; people are already used to this aspect of Guix, but the fact that they need to code up their own shell wrappers to manage multiple profiles is not good optics imo. > 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 profile>.  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. I don't think that's meaningful. For one, time-machine exists, for the other you can directly use inferiors in code. With profiles managed by Guix Home, you could even make it so that said inferiors are "globally" managed. I don't think a manifest consisting of inferior packages only would require rebuilding.   Another dirty hack would be to have the manifest evaluate to #f when you don't want to update it – as per my specification it will in that case be assumed that you're manually managing it. Then all you need to control when to build it is a smart binding of environment variables. Cheers