Message ID | 20220313215259.9394-1-ludo@gnu.org |
---|---|
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9145927BBEA; Sun, 13 Mar 2022 21:54:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 656EE27BBE9 for <patchwork@mira.cbaines.net>; Sun, 13 Mar 2022 21:54:10 +0000 (GMT) Received: from localhost ([::1]:45270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>) id 1nTWAD-0001fN-GL for patchwork@mira.cbaines.net; Sun, 13 Mar 2022 17:54:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1nTWA6-0001fF-Os for guix-patches@gnu.org; Sun, 13 Mar 2022 17:54:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49558) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1nTWA6-00074m-Gb for guix-patches@gnu.org; Sun, 13 Mar 2022 17:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1nTWA6-0007nO-A0; Sun, 13 Mar 2022 17:54:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54377] [PATCH 0/3] Add 'guix home container' Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: andrew@trop.in, guix-patches@gnu.org Resent-Date: Sun, 13 Mar 2022 21:54:02 +0000 Resent-Message-ID: <handler.54377.B.164720839229902@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54377 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54377@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org>, Andrew Tropin <andrew@trop.in> X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Andrew Tropin <andrew@trop.in> Received: via spool by submit@debbugs.gnu.org id=B.164720839229902 (code B ref -1); Sun, 13 Mar 2022 21:54:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Mar 2022 21:53:12 +0000 Received: from localhost ([127.0.0.1]:43455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1nTW9I-0007mC-7R for submit@debbugs.gnu.org; Sun, 13 Mar 2022 17:53:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:35734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@gnu.org>) id 1nTW9G-0007m5-7s for submit@debbugs.gnu.org; Sun, 13 Mar 2022 17:53:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@gnu.org>) id 1nTW9G-0001bk-0O for guix-patches@gnu.org; Sun, 13 Mar 2022 17:53:10 -0400 Received: from [2001:470:142:3::e] (port=34762 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@gnu.org>) id 1nTW9F-000726-O6; Sun, 13 Mar 2022 17:53:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=Yl14KND/SxGThYOtDNZZRtyLBeHxfWqtxfEsdO85n4A=; b=LYSU6EnuptfgvB nFauxt9ldJUcfUucvtSZVjOX60/PGlXu4fU9P/ehY4wQiDo7xAoB6lrYv+dez4iuIdhdCQJxBDMNp BK9+pPXHe6pt5zeUH5FnHhBre7BcsWhym5dTpqRE6ailHl8WMze2b6QVBFs09+xQRaGnYGudBsQGM z65KKThFQvEJWh4xPIUrKnr3RWZUVRH+yNaFOfvPCRMfNZt/xJdmEMJCiPeTGW1qKBaad2ZgF/EW0 DgRgeIwQ2fMnkSszpqKpLW16Rq1zlSpcihS7xdYWX3Fheg1yGfUEqWAbBdrqINL1/att31/dGqD70 oU8SKS6CT01n8OcE1Kiw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:49623 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <ludo@gnu.org>) id 1nTW9F-00037p-4I; Sun, 13 Mar 2022 17:53:09 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org> Date: Sun, 13 Mar 2022 22:52:59 +0100 Message-Id: <20220313215259.9394-1-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-getmail-retrieved-from-mailbox: Patches |
Series | Add 'guix home container' | |
Message
Ludovic Courtès
March 13, 2022, 9:52 p.m. UTC
Hello Guix! This patch series adds a ‘guix home container’ command. You can run: guix home container config.scm and you get an interactive shell, started as a login shell, where you can check the effect of your configuration. Handy! The code is a bit redundant with that of ‘guix environment’, but slightly different, so no obvious way to factorize it came to mind. Feedback welcome! Ludo’. Ludovic Courtès (3): linux-container: 'eval/container' honors #:namespaces. linux-container: Add #:guest-uid and #:guest-gid to 'eval/container'. guix home: Add 'container' command. doc/guix.texi | 58 +++++++ gnu/system/linux-container.scm | 15 +- guix/scripts/home.scm | 271 ++++++++++++++++++++++++++++++--- tests/guix-home.sh | 58 +++++-- 4 files changed, 359 insertions(+), 43 deletions(-) base-commit: d41c82b481fd0f5c7d45d6e2629fdf9d2085205b
Comments
Ludo, This is a very exciting idea. Entry into guix home has some wrinkles in it that are scary. I know it required several iterations over home-configuration.scm and 'guix home reconfigure' before I was able to make peace with my guix home. I see in irc that others are also experiencing challenges getting the environments where they want them to be. This patch allows more control over the adoption of guix home while also cleverly leveraging improvements to guix containers. Very cool, I want it! I ran this patch against my current, working home configuration to see what happened and I ran into a problem. My home-configuration.scm sets the GUIX_PACKAGE_PATH (using simple-service 'local-environment-variables) and then references packages that are in that path (in my case a package called emacs-ix). When I executed 'guix home container <my-config.scm>' I received the following errors: guix home: error: emacs-ix: unknown package guix home: error: failed to load '/home/fpp/src/guix-home-config/home-configuration.scm': gnu/packages.scm:544:4: In procedure specification->package+output: IDK if this is the desired behavior. Can the environment set in config.scm be set before loading the packages that may modify the environment? Regards, Frank Pursel acrow#guix
Hi Frank, Frank Pursel <frank.pursel@gmail.com> skribis: > This is a very exciting idea. Entry into guix home has some wrinkles in > it that are scary. I know it required several iterations over > home-configuration.scm and 'guix home reconfigure' before I was able to > make peace with my guix home. I see in irc that others are also > experiencing challenges getting the environments where they want them to > be. This patch allows more control over the adoption of guix home while > also cleverly leveraging improvements to guix containers. Very cool, I > want it! I agree, that very well summarizes my motivation for adding it! > I ran this patch against my current, working home configuration to see > what happened and I ran into a problem. My home-configuration.scm sets > the GUIX_PACKAGE_PATH (using simple-service > 'local-environment-variables) and then references packages that are in > that path (in my case a package called emacs-ix). When I executed 'guix > home container <my-config.scm>' I received the following errors: > > guix home: error: emacs-ix: unknown package > guix home: error: failed to load '/home/fpp/src/guix-home-config/home-configuration.scm': > gnu/packages.scm:544:4: In procedure specification->package+output: > > IDK if this is the desired behavior. Can the environment set in > config.scm be set before loading the packages that may modify the > environment? If you want ‘home-configuration.scm’ to refer to files in that path, then GUIX_PACKAGE_PATH needs to be set in the environment of where ‘guix home’ itself is running. Like so: export GUIX_PACKAGE_PATH=/path/to/your/packages guix home container … Alternatively, you can run: guix home container -L /path/to/your/packages … HTH! Ludo’.
Yes, of course, export or -L were needed to get my GUIX_PACKAGE_PATH recognized. and so it was helpful. After catching a configuration error the GUIX_PACKAGE_PATH I had added to an instance of home-environment-service-type works; so that, I no longer need to do this. I'm in the process of finding out how helpful the new guix home container is in rooting out problems in guix home configurations. Thank you, Frank On Sat, Mar 19, 2022 at 10:32 AM Ludovic Courtès <ludo@gnu.org> wrote: > Hi Frank, > > Frank Pursel <frank.pursel@gmail.com> skribis: > > > This is a very exciting idea. Entry into guix home has some wrinkles in > > it that are scary. I know it required several iterations over > > home-configuration.scm and 'guix home reconfigure' before I was able to > > make peace with my guix home. I see in irc that others are also > > experiencing challenges getting the environments where they want them to > > be. This patch allows more control over the adoption of guix home while > > also cleverly leveraging improvements to guix containers. Very cool, I > > want it! > > I agree, that very well summarizes my motivation for adding it! > > > I ran this patch against my current, working home configuration to see > > what happened and I ran into a problem. My home-configuration.scm sets > > the GUIX_PACKAGE_PATH (using simple-service > > 'local-environment-variables) and then references packages that are in > > that path (in my case a package called emacs-ix). When I executed 'guix > > home container <my-config.scm>' I received the following errors: > > > > guix home: error: emacs-ix: unknown package > > guix home: error: failed to load > '/home/fpp/src/guix-home-config/home-configuration.scm': > > gnu/packages.scm:544:4: In procedure specification->package+output: > > > > IDK if this is the desired behavior. Can the environment set in > > config.scm be set before loading the packages that may modify the > > environment? > > If you want ‘home-configuration.scm’ to refer to files in that path, > then GUIX_PACKAGE_PATH needs to be set in the environment of where ‘guix > home’ itself is running. Like so: > > export GUIX_PACKAGE_PATH=/path/to/your/packages > guix home container … > > Alternatively, you can run: > > guix home container -L /path/to/your/packages … > > HTH! > > Ludo’. >