From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UN3cJwRHQGFOfQAAgWs5BA (envelope-from ) for ; Tue, 14 Sep 2021 08:53:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id OIeGIwRHQGHZXgAAB5/wlQ (envelope-from ) for ; Tue, 14 Sep 2021 06:53:56 +0000 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 D14DCE066 for ; Tue, 14 Sep 2021 08:53:55 +0200 (CEST) Received: from localhost ([::1]:51728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQ2KI-0004Uh-Ta for larch@yhetil.org; Tue, 14 Sep 2021 02:53:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQ2Jv-0004Tv-8q for guix-devel@gnu.org; Tue, 14 Sep 2021 02:53:31 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:40811) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQ2Js-0007Vl-JX for guix-devel@gnu.org; Tue, 14 Sep 2021 02:53:30 -0400 Received: by mail-wr1-x432.google.com with SMTP id q26so18414793wrc.7 for ; Mon, 13 Sep 2021 23:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=uqx2uYAs570EbdB45JpehNWBiI9Q6bBmebsb0y5xa1s=; b=ONFkbGWPrdWVYZOrWRlJ+l3rnCUOJsXco6sOMP70ZxtUmviq4oay2Y1+w1qESV+cKM fu28m5F8/wYpboZ6vUW79NWu7Tw04TEh1sb18XW56cVcnP/bAujsu6eUGn82YGyKSkE5 ivj2LKpltSWRTL6yTPaLO1Pfw7rJiCxKidZqci4Cvo4/uLeCNGoFjCsnVVysYO5EuY6m 1CsWqhigd6PKXO8MliK4U1ZDdrOTNBjaJ1bO51xROx9pwmSqnIdQzQNKsm1L8+PpQBYk tAM4mZStUr/QfiwrxkUiLTEvnuXd0mlgp2SATDeDQuU2M5hlh9QRHS+eVJbA///ATaEG R9sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=uqx2uYAs570EbdB45JpehNWBiI9Q6bBmebsb0y5xa1s=; b=wB0B60Rql2TnnHlTBhCBdnZIDFjTgSq4F+ciBOyUTGxXMCOD8dWsZpT2/pUrMK6RjM S/WpCnbzRoFFGVERBqKgOR0cdduERu1C0+EcTwfvepES99a074grEQXVufROeYZk/tu5 PfWVRcVANguPYpkJ33Bi4yxJtd6SFU0z+uFyZTmgq3FMFLfc379vhuIw+AdqdagA/cBo jzNQMejW7J5PF6IpP1kjnBCfvN0cEJPfYEJa0Z7TvDBPicalEJz6bSQ7gDiDcH6LVibG Bjdf4F0ZleFVCUfs59qlsonWTCf1JacsJ+l1LRXXrmgYnA7UxwiBJbk6Z9Jo84FPkI1c 1lSQ== X-Gm-Message-State: AOAM530cacnLgThjIgk59LDDlVjdK7LLXxOMufbqtnjo3pInOr+h4y9I q40XCZQ2a/XPPre5b3lxPJj+8Pi/VPzMSQ== X-Google-Smtp-Source: ABdhPJxmt29TkR76J5lMg5UM2ETDwCGE1MtFKiOF7A/VYFv1k6zOGCafdxxNfRUZddUvaX5OOiykzA== X-Received: by 2002:a5d:5147:: with SMTP id u7mr2208182wrt.69.1631602405822; Mon, 13 Sep 2021 23:53:25 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id r25sm10287223wrc.26.2021.09.13.23.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 23:53:25 -0700 (PDT) From: zimoun To: Ryan Prior , pinoaffe Subject: Re: Named environments In-Reply-To: <4WH_uctsaulZjYrHDmNui178VC8g56-Vt_oSIsY2FvInhC07RDKAQTEv4A4Ghlh8FTNaZLJY1gDzTdzcH_DmbHL_sAxC9DEFP-co6u0ISEY=@protonmail.com> References: <87wnnka338.fsf@airmail.cc> <4WH_uctsaulZjYrHDmNui178VC8g56-Vt_oSIsY2FvInhC07RDKAQTEv4A4Ghlh8FTNaZLJY1gDzTdzcH_DmbHL_sAxC9DEFP-co6u0ISEY=@protonmail.com> Date: Tue, 14 Sep 2021 08:30:38 +0200 Message-ID: <86zgsfr7n5.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x432.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631602436; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=uqx2uYAs570EbdB45JpehNWBiI9Q6bBmebsb0y5xa1s=; b=jMS8G28y6k+WwN+mAMIkqAeAm7eSoX0MrW35CkL53q/BzhlBDmAr7zp0WMofAjvICVqVuF CIulHz1cjcj0MSQ91Q3rI70xGh4h6k77X2iVr5Nce0I3KNi8jr7YEwTy2KLKPQEaaG/d+Z P0h/JtPW9HoNVPkWdKDcD7jzo7oHjLVwxbGx5D4JlDTyNMrP2GnzBU0a1YJpEJig2nBnJM p1fFU8wfL9p7dZay3lID10vH5Z0C3KFsn4M/+51qTiTu7/vNhDvLqMdAajkF73MRdQakRG nXr0h9C1GBMAeeG18K5SsdUItM74ATz+P1sraUXdSUUQXt/VKIue8or9GhUR/g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631602436; a=rsa-sha256; cv=none; b=gVyLoSLEm45O7HDXzMRAem835HcUlqVpVmiSAxWiI5/LWZIshnUSdVW7Ytl0rUpywcSjom DARcxP/iAf8ymYkq41NZP0sBu+NU+22EYpkhlHr/Ie6+QqPcsshcQv6Igdejmm1EKoUvVr VQkR8ho03UTYK8MhyRQP0zNrlRumP5XTSLWQn2n2qSypyGO2GzyWnLa2LORYPEYRmZvGma f6KVgdcb5+Z78zTo8kl/p/5N0HgJ3OTMQ+dVCorpV1IFg35MHDJFGD5q13j6cF/+BG8tZx Q/YsCPZ6nEJ7I4zUXmJvZufpwSntGy3SjR8wM1QCTGGVIzWLKU4n30YpKA4E5g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ONFkbGWP; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -1.60 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ONFkbGWP; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: D14DCE066 X-Spam-Score: -1.60 X-Migadu-Scanner: scn0.migadu.com X-TUID: HRHSPNBWjC01 Hi Ryan, On Tue, 14 Sep 2021 at 02:32, Ryan Prior wrote: > On Monday, September 13th, 2021 at 3:48 PM, pinoaffe wrote: > >> this sounds very similar to the features offered by profiles > > Agreed, and maybe it's good to unify these things or be more explicit > about how they're different? =E2=80=9Cguix environment=E2=80=9D is a temporary profile. ;-) --8<---------------cut here---------------start------------->8--- $ guix environment --ad-hoc hello $ echo $GUIX_ENVIRONMENT /gnu/store/lw9x5aimyqcq5iazj786fv7q5l3h0syk-profile --8<---------------cut here---------------end--------------->8--- And see the option =E2=80=99--profile=E2=80=99 and =E2=80=99--root=E2=80=99. Years ago, it had been discussed a =E2=80=9Cguix profile=E2=80=9D subcomman= d in order to help the management. Maybe it could be resumed. Also note what is really missing, IMHO, is the feature to =E2=80=9Ccontainerized=E2=80=9D some apps. > What I see as the defining characteristic of a profile, is that it > exists in a certain directory with a script (etc/profile) & structure > to allow an end-user to activate it. Well, a proof-of-concept attempt of such feature could be done with a script and =E2=80=9Cguix repl=E2=80=9D, then using =E2=80=9CGUIX_EXTENSIO= NS_PATH=E2=80=9D, you could type: guix profile load As a starting point, see . > It lacks some things I associate with the concept of named environments: > > - There is afaik no definitive list of profiles on your machine. I =E2=80=9Cguix package --list-profiles=E2=80=9D lists all the user profiles. Running the same as root lists all the profiles. Do you need more? > know "guix gc" knows somethings, but "gc --show-roots" doesn't give me > useful info here. If I give names to "named environments" then that > implies there's some registry of names which I can easily query to > refer to a specific environment. This is important for integration > with tools where you want to refer to a specific environment > (profile?) by a shorthand name. > > > - I can easily update environments using my text editor, because > they're based on manifests. I know you can export & import profiles, > but the API to update profiles is basically imperative. Beyond that, I do not understand what means =C2=ABupdate profiles is basically imperative=C2=BB. Somehow, a profile is a list of transactions; the way to populate such transaction can be =E2=80=9Cimperative=E2=80=9D or =E2=80=9Cd= eclarative=E2=80=9D but I miss how the transaction itself could be =E2=80=9Cimperative=E2=80=9D or = =E2=80=9Cdeclarative=E2=80=9D. Well, from my understanding. :-) > it doesn't seem like you can check a profile into source control, but > I'd very much like to check manifests for named environments into git You are speaking about the manifest.scm file, right? Not the internal etc/manifest file. >From my understanding, the way to share environment is to share this manifest.scm file and the channels.scm file. However, as explained earlier or elsewhere, it miss =E2=80=9Csomething=E2=80=9D to easily write m= anifest.scm file where some apps run in container. Currently, it is: guix time-machine -C channels.scm \ environment -m manifest.scm \ -C -E it could be nice to be able to easily declare all the =E2=80=9C-C -E =E2=80=9D directly in the manifest.scm file. > to share them with people. Maybe this can just be bridged and we can > get some kind of profiles-as-code concept going, as well as an > imperative API for updating manifests (as Sarah Morgensen proposed > IIRC with her "guix env --edit" command) Once a profile, you can use =E2=80=99--export-manifest=E2=80=99. --8<---------------cut here---------------start------------->8--- $ guix environment --ad-hoc hello $ echo $GUIX_ENVIRONMENT /gnu/store/lw9x5aimyqcq5iazj786fv7q5l3h0syk-profile $ exit exit $ guix package --export-manifest -p /gnu/store/lw9x5aimyqcq5iazj786fv7q5l3h= 0syk-profile ;; This "manifest" file can be passed to 'guix package -m' to reproduce ;; the content of your profile. This is "symbolic": it only specifies ;; package names. To reproduce the exact same profile, you also need to ;; capture the channels being used, as returned by "guix describe". ;; See the "Replicating Guix" section in the manual. (specifications->manifest (list "hello")) --8<---------------cut here---------------end--------------->8--- You cannot edit on-the-fly the manifest. It would break the declarative approach, IMHO. Well, from my understanding, you cannot have a link between the manifest.scm file which is used to instantiate a profile and the profile itself. It is not a 1:1 map. Once the profile (named environment or not :-)), you can only recreate an approximation of a manifest.scm file. And from my understanding, the option =E2=80=9C-C -E =E2=80=9C are = not encoded in the profile. Maybe something is missing in this area. > - Profiles don't seem to have certain desirable features that Guix > environments do, such as pure execution, containerization with or > without access to network or certain parts of the filesystem, > etc. Maybe my understanding here is superficial and you can actually > do this with profiles after all?=20 I agree, something is missing here. All the best, simon