From patchwork Fri Apr 4 03:22:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 41256 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4583827BBEA; Fri, 4 Apr 2025 04:24:27 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI, PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 6CD4227BBE2 for ; Fri, 4 Apr 2025 04:24:26 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u0Xf9-0006va-FJ; Thu, 03 Apr 2025 23:24:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xf2-0006v8-LI for guix-patches@gnu.org; Thu, 03 Apr 2025 23:24:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u0Xf2-0002lT-Cf for guix-patches@gnu.org; Thu, 03 Apr 2025 23:24:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=d0tH94RRK/KrRDzwZPVwFrDUHNaidGFC1Mjnjv4ImOs=; b=hzx2+isvlwhPuodq3r4P8UyKaUbGxfx5rYJ6nQ0UkF7d9ccvKmnJBsxsHrPXLKj9+k3+DkI0BV5y0k82OoTh+hVdHRNc/irLAE8hn+CwaTDmBbtBZh3n/hkRovFvBn5sekat/jjtfSYbiJsTVsUOwiNcEETwHJ6jVFzmxnO0vKS1InveHULC4fA6+EAM2153rg6lm9RwzZQVZfCHm0bN2ZoI8m0f4Gi/jpSfckM6Gc1w+hTRrS5z6Pt2AMYYC9rt8u8/Q9vjz0vp625iYqQCiGEY+n+wMGerxpHEaNMj0t9tL2+7rphHCs8z5L7SVEuhcnSYcm1IXyqjWTa2cYJSfw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u0Xf2-0002cF-5j for guix-patches@gnu.org; Thu, 03 Apr 2025 23:24:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77523] [PATCH v4 1/6] system: /etc/profile: Group profile sourcing. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Apr 2025 03:24:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77523 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77523@debbugs.gnu.org Cc: Hilton Chain X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17437370319962 (code B ref -1); Fri, 04 Apr 2025 03:24:03 +0000 Received: (at submit) by debbugs.gnu.org; 4 Apr 2025 03:23:51 +0000 Received: from localhost ([127.0.0.1]:36537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0Xeo-0002ab-QE for submit@debbugs.gnu.org; Thu, 03 Apr 2025 23:23:51 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49132) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u0Xel-0002Zy-Tf for submit@debbugs.gnu.org; Thu, 03 Apr 2025 23:23:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xeg-0006sO-BD for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:42 -0400 Received: from mx.boiledscript.com ([2a01:4f8:10b:392::42]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xee-0002hH-HF for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:42 -0400 From: Hilton Chain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=mail; t=1743737017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d0tH94RRK/KrRDzwZPVwFrDUHNaidGFC1Mjnjv4ImOs=; b=Gk+xzcD+xBISwfLKRgaiORzZIR+sJ3NlkLciSgUm9Nm1sfzzJEf3rRoEEr5QT4hHA6KGs5 3vbbsIDb1nIeFwVG5dppzGYKemCuI8v4l/jngLcSNVo9n4vuJYzi7is+EjdPHRVHzOTgSc Ai2lPQGDGMssuX23SwnXZYp20CujwkQmMeuF8v3sn7LtOS2E4HeNLt/IMYzr55oNE750p0 45pEigS9GC4J7C6n4KmjotUrkehnKp6QfwNT+ddbeNbiW7rO4EDrrfWshP/mcBYC5mxBnj b37zZX8ziveEc2eIuFSydwmUPVb2olkLjmWz2py/rgQR6UukTm3Ly9UdvIc2Dg== Date: Fri, 4 Apr 2025 11:22:58 +0800 Message-ID: In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=2a01:4f8:10b:392::42; envelope-from=hako@ultrarare.space; helo=mx.boiledscript.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/system.scm (operating-system-etc-service)[profile]: Group sourcing of all default profiles. Order Guix Home search paths before the default user profile. Rename iteration variable to GUIX_PROFILE. Change-Id: I18eac738a5dfade84da2effdd6211119c6fdd96f --- gnu/system.scm | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 0d98e5a036..c166222854 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1074,10 +1074,6 @@ (define* (operating-system-etc-service os) # Ignore the default value of 'PATH'. unset PATH -# Load the system profile's settings. -GUIX_PROFILE=/run/current-system/profile ; \\ -. /run/current-system/profile/etc/profile - # Since 'lshd' does not use pam_env, /etc/environment must be explicitly # loaded when someone logs in via SSH. See . # We need 'PATH' to be defined here, for 'cat' and 'cut'. Do this before @@ -1086,24 +1082,22 @@ (define* (operating-system-etc-service os) -a -z \"$LINUX_MODULE_DIRECTORY\" ] then . /etc/environment - export `cat /etc/environment | cut -d= -f1` + export `/run/current-system/profile/bin/cut -d= -f1 < /etc/environment` fi -# Arrange so that ~/.config/guix/current comes first, -# and guix-home comes before guix-profile. -for profile in \"$HOME/.guix-profile\" \\ - \"$HOME/.guix-home/profile\" \\ - \"$HOME/.config/guix/current\" +# Set up environment for all default profiles. +for GUIX_PROFILE in \"/run/current-system/profile\" \\ + \"$HOME/.guix-home/profile\" \\ + \"$HOME/.guix-profile\" \\ + \"$HOME/.config/guix/current\" do - if [ -f \"$profile/etc/profile\" ] + if [ -f \"$GUIX_PROFILE/etc/profile\" ] then - # Load the user profile's settings. - GUIX_PROFILE=\"$profile\" ; \\ - . \"$profile/etc/profile\" + . \"$GUIX_PROFILE/etc/profile\" else # At least define this one so that basic things just work # when the user installs their first package. - export PATH=\"$profile/bin:$PATH\" + export PATH=\"$GUIX_PROFILE/bin:$PATH\" fi done From patchwork Fri Apr 4 03:22:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 41257 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6A16027BBEA; Fri, 4 Apr 2025 04:24:43 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI, PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 B73AF27BBE2 for ; Fri, 4 Apr 2025 04:24:42 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u0XfC-0006wl-2x; Thu, 03 Apr 2025 23:24:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xf5-0006vR-8e for guix-patches@gnu.org; Thu, 03 Apr 2025 23:24:07 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u0Xf4-0002lo-CP for guix-patches@gnu.org; Thu, 03 Apr 2025 23:24:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=E2TOJ35Cov5wFIkREoQgpNdalmX8Iee+ZPO530mXw1c=; b=tXoEwD6nQGnYSLyxNbaD3GsXoJ3l2lqgLx4ctzOJTYDUPK7sn9CdV4kBNSp80PSe9/QhSo+3tq0jFQm4WHSe7aRZGq8xpYOWcG2iu4BAqCe+z+r5OQnMy7Uf4Td7ITZvrzEOsk6ButzPTTavjKMly+x4E9WTQb0gMPYM3HIxJqs2NYKHGM0NB2XVR26uu7lC0qUTov+PA/nL2a/tOIXlooCAbTrDfpZnNC95UX6npKWPXY3wx9c6dzml5Zpuj2pzOmDjBappaFNEW66juafMg5YmYyJTWeDPn+wBFR8pAltGeMRDt924fpdylnUCDNTHnOxx1jHbDvVUSpc+BmrA1Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u0Xf4-0002cr-6W for guix-patches@gnu.org; Thu, 03 Apr 2025 23:24:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77525] [PATCH v4 2/6] system: /etc/profile: Rearrange to avoid search path duplication. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Apr 2025 03:24:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77525 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77525@debbugs.gnu.org Cc: Hilton Chain X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17437370369989 (code B ref -1); Fri, 04 Apr 2025 03:24:05 +0000 Received: (at submit) by debbugs.gnu.org; 4 Apr 2025 03:23:56 +0000 Received: from localhost ([127.0.0.1]:36541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0Xet-0002b2-8T for submit@debbugs.gnu.org; Thu, 03 Apr 2025 23:23:55 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49146) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u0Xen-0002a0-6g for submit@debbugs.gnu.org; Thu, 03 Apr 2025 23:23:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xeh-0006sm-SO for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:43 -0400 Received: from mx.boiledscript.com ([88.99.243.112]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xef-0002hb-Sx for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:43 -0400 From: Hilton Chain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=mail; t=1743737019; h=from:from: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; bh=E2TOJ35Cov5wFIkREoQgpNdalmX8Iee+ZPO530mXw1c=; b=cSTsedYNCVNwdB8ksTDy11zHF2Ni9j49dXpsSdR0vv4h6sN1OMah8HZ0a/5DNDzJnHUilh ZAWtg2mvc3Zx5JQieLlTBllb/fu2kdY4XZcw0JFSdUmGH9jPg+rrtHTnGgFc5mUVbgwkF4 YpCv51vD7ebg9NZ9x219NKbChb45wyJtTJr0RSA7V+TcNxa1GaHN9oDO7RvJXEv402/B0T x39wm0BcBP14BbnVGWrbzNS96cmh5ETEg1CufV70oYLh/xUNjAMEOfygOen5D097pJFvrr wLUL6ElpJkJgOymW/WGaMN50KSvCzRSy7+8zH0p9+Y3CULmbGJweqJCZ5BGDdw== Date: Fri, 4 Apr 2025 11:22:59 +0800 Message-ID: <94cf181828817e485cb92cf80365881fe8a8cf47.1743736516.git.hako@ultrarare.space> In-Reply-To: References: MIME-Version: 1.0 X-MS-Reactions: disallow Received-SPF: pass client-ip=88.99.243.112; envelope-from=hako@ultrarare.space; helo=mx.boiledscript.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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/system.scm (operating-system-etc-service)[profile]: Set umask first. Group environment variables setup with profile sourcing to avoid duplication. Export $GUILE_LOAD_PATH and $GUILE_LOAD_COMPILED_PATH for ‘guix pull’ profile. * gnu/system/shadow.scm (%default-bash-profile): Remove duplicated exports. Change-Id: I42ae153b9cd47ca24448fa18ce7f80a5e5c06621 --- gnu/system.scm | 96 +++++++++++++++++++++++++++++-------------- gnu/system/shadow.scm | 10 ----- 2 files changed, 65 insertions(+), 41 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index c166222854..46e6729e74 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1060,16 +1060,9 @@ (define* (operating-system-etc-service os) ;; Startup file for POSIX-compliant login shells, which set system-wide ;; environment variables. (profile (mixed-text-file "profile" "\ -# Crucial variables that could be missing in the profiles' 'etc/profile' -# because they would require combining both profiles. -# FIXME: See . -export MANPATH=$HOME/.guix-profile/share/man:/run/current-system/profile/share/man -export INFOPATH=$HOME/.guix-profile/share/info:/run/current-system/profile/share/info -export XDG_DATA_DIRS=$HOME/.guix-profile/share:/run/current-system/profile/share -export XDG_CONFIG_DIRS=$HOME/.guix-profile/etc/xdg:/run/current-system/profile/etc/xdg - -# Make sure libXcursor finds cursors installed into user or system profiles. See -export XCURSOR_PATH=$HOME/.icons:$HOME/.guix-profile/share/icons:/run/current-system/profile/share/icons +# Set the umask, notably for users logging in via 'lsh'. +# See . +umask 022 # Ignore the default value of 'PATH'. unset PATH @@ -1091,32 +1084,73 @@ (define* (operating-system-etc-service os) \"$HOME/.guix-profile\" \\ \"$HOME/.config/guix/current\" do - if [ -f \"$GUIX_PROFILE/etc/profile\" ] - then + if [ -f \"$GUIX_PROFILE/etc/profile\" ]; then . \"$GUIX_PROFILE/etc/profile\" - else - # At least define this one so that basic things just work - # when the user installs their first package. - export PATH=\"$GUIX_PROFILE/bin:$PATH\" + if [ ! \"$GUIX_PROFILE\" = \"$HOME/.config/guix/current\" ]; then + # Crucial variables that could be missing in the profiles' 'etc/profile' + # because they would require combining both profiles. + # FIXME: See . + case $XDG_DATA_DIRS in + *$GUIX_PROFILE/share*) ;; + *) export XDG_DATA_DIRS=\"$GUIX_PROFILE/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS\" ;; + esac + case $XDG_CONFIG_DIRS in + *$GUIX_PROFILE/etc/xdg*) ;; + *) export XDG_CONFIG_DIRS=\"$GUIX_PROFILE/etc/xdg${XDG_CONFIG_DIRS:+:}$XDG_CONFIG_DIRS\" ;; + esac + # Make sure libXcursor finds cursors installed into user or system profiles. + # See + case $XCURSOR_PATH in + *$GUIX_PROFILE/share/icons*) ;; + *) export XCURSOR_PATH=\"$GUIX_PROFILE/share/icons${XCURSOR_PATH:+:}$XCURSOR_PATH\" ;; + esac + # Allow Hunspell-based applications (IceCat, LibreOffice, etc.) to find + # dictionaries. + case $DICPATH in + *$GUIX_PROFILE/share/hunspell*) ;; + *) export DICPATH=\"$GUIX_PROFILE/share/hunspell${DICPATH:+:}$DICPATH\" ;; + esac + # Allow GStreamer-based applications to find plugins. + case $GST_PLUGIN_PATH in + *$GUIX_PROFILE/lib/gstreamer-1.0*) ;; + *) export GST_PLUGIN_PATH=\"$GUIX_PROFILE/lib/gstreamer-1.0${GST_PLUGIN_PATH:+:}$GST_PLUGIN_PATH\" ;; + esac + fi + fi + if [ \"$GUIX_PROFILE\" = \"$HOME/.config/guix/current\" ]; then + # Expose the latest Guix modules to Guile so guix shell and repls spawned by + # e.g. Geiser work out of the box. + case $GUILE_LOAD_PATH in + *$GUIX_PROFILE/share/guile/site/3.0*) ;; + *) export GUILE_LOAD_PATH=\"$GUIX_PROFILE/share/guile/site/3.0${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH\" ;; + esac + case $GUILE_LOAD_COMPILED_PATH in + *$GUIX_PROFILE/lib/guile/3.0/site-ccache*) ;; + *) export GUILE_LOAD_COMPILED_PATH=\"$GUIX_PROFILE/lib/guile/3.0/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH\" ;; + esac fi + # Make basic things just work when the user installs their first package. + case $PATH in + *$GUIX_PROFILE/bin*) ;; + *) export PATH=\"$GUIX_PROFILE/bin${PATH:+:}$PATH\" ;; + esac + # When INFOPATH is unset, add a trailing colon so Emacs searches + # 'Info-default-directory-list'. + case $INFOPATH in + *$GUIX_PROFILE/share/info*) ;; + *) export INFOPATH=\"$GUIX_PROFILE/share/info:$INFOPATH\" ;; + esac + # When MANPATH is unset, add a trailing colon so the system default search + # path is used. + case $MANPATH in + *$GUIX_PROFILE/share/man*) ;; + *) export MANPATH=\"$GUIX_PROFILE/share/man:$MANPATH\" ;; + esac done -# Prepend privileged programs. +# Prepend search paths not in a profile. export PATH=/run/privileged/bin:$PATH - -# Arrange so that ~/.config/guix/current/share/info comes first. -export INFOPATH=\"$HOME/.config/guix/current/share/info:$INFOPATH\" - -# Set the umask, notably for users logging in via 'lsh'. -# See . -umask 022 - -# Allow Hunspell-based applications (IceCat, LibreOffice, etc.) to -# find dictionaries. -export DICPATH=\"$HOME/.guix-profile/share/hunspell:/run/current-system/profile/share/hunspell\" - -# Allow GStreamer-based applications to find plugins. -export GST_PLUGIN_PATH=\"$HOME/.guix-profile/lib/gstreamer-1.0\" +export XCURSOR_PATH=\"$HOME/.icons:$XCURSOR_PATH\" if [ -n \"$BASH_VERSION\" -a -f /etc/bashrc ] then diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index b68a818871..cdb804da18 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -179,16 +179,6 @@ (define %default-bash-profile # Honor per-interactive-shell startup file if [ -f ~/.bashrc ]; then . ~/.bashrc; fi - -# Merge search-paths from multiple profiles, the order matters. -eval \"$(guix package --search-paths \\ --p $HOME/.config/guix/current \\ --p $HOME/.guix-home/profile \\ --p $HOME/.guix-profile \\ --p /run/current-system/profile)\" - -# Prepend setuid programs. -export PATH=/run/setuid-programs:$PATH ")) (define %default-zprofile From patchwork Fri Apr 4 03:23:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 41260 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B41DD27BBEA; Fri, 4 Apr 2025 04:24:59 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI, PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 ACC1327BBE2 for ; Fri, 4 Apr 2025 04:24:58 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u0XfF-0006y5-Mf; Thu, 03 Apr 2025 23:24:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xf9-0006w3-Il for guix-patches@gnu.org; Thu, 03 Apr 2025 23:24:11 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u0Xf8-0002mn-Iv; Thu, 03 Apr 2025 23:24:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=tm9Lvhwm7Z/F7x6u5dWGMXUbr4UiI1vKjwS8fQdmtt0=; b=qYtJRvSBpnmSlcqbBdPiKv7W10Iwbj/KLxwmUYWMmsQnCq+GC9Ac6d8EE+hGfuafI8VwsZ3RfTrbJZANykwrO7GtPWFDuAoXAVFOHzrIUStdhwKXeKL1IUB60RXyoc5/x+WKOjHthbDz/yosrFeTYVTargc8LeH5u+4N9s+zdf0h1Unqvoxuj+zk+XTdUOJJY4lXPCeklCHhcLhP3yScXf09Q9rOSFHHckZKTp4pYEkn+kQ3SGA2gjTHzOY/k+AptqD8Wx6T25LqAmO+4sd5rYgBmLWbalMKZkqBhUv5kiIkPQQ4qqmzx2jg2mAp31BQDiMtSPvFZWLIp7joeI7/8g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u0Xf5-0002d5-7l; Thu, 03 Apr 2025 23:24:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77526] [PATCH v4 3/6] system: /etc/profile: Set up extra environment variables for Guix Home. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, hako@ultrarare.space, janneke@gnu.org, ludo@gnu.org, tanguy@bioneland.org, guix-patches@gnu.org Resent-Date: Fri, 04 Apr 2025 03:24:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77526 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77526@debbugs.gnu.org Cc: Hilton Chain , Andrew Tropin , Hilton Chain , Janneke Nieuwenhuizen , Ludovic =?utf-8?q?Court=C3=A8s?= , Tanguy Le Carrour X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Andrew Tropin , Hilton Chain , Janneke Nieuwenhuizen , Ludovic =?utf-8?q?Court=C3=A8s?= , Tanguy Le Carrour Received: via spool by submit@debbugs.gnu.org id=B.174373703710010 (code B ref -1); Fri, 04 Apr 2025 03:24:06 +0000 Received: (at submit) by debbugs.gnu.org; 4 Apr 2025 03:23:57 +0000 Received: from localhost ([127.0.0.1]:36546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0Xeu-0002bN-RZ for submit@debbugs.gnu.org; Thu, 03 Apr 2025 23:23:57 -0400 Received: from lists.gnu.org ([2001:470:142::17]:32922) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u0Xeo-0002a2-CI for submit@debbugs.gnu.org; Thu, 03 Apr 2025 23:23:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xei-0006su-QO for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:44 -0400 Received: from mx.boiledscript.com ([2a01:4f8:10b:392::42]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xeh-0002hu-7x for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:44 -0400 From: Hilton Chain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=mail; t=1743737021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tm9Lvhwm7Z/F7x6u5dWGMXUbr4UiI1vKjwS8fQdmtt0=; b=Mtr+xzaDPlPyNGlIt4cVLD9OQNyLWE1CwfTmBXcoKyXXvzDYpcHz/V+Qe+ONJQ91d4HvDE PGQkO2RketzqtqrwVal5Phbtuhk4ZG4nyBX5pfzyBzo1IOB+eOR54tZbmu+pkCz61NmlGv MWOivYO2RDrBXDARbpoBaK91QG8+VXWmZPKrZ0B1uSrItjhERBhRFPA8pwJMyIzetX2J3R x2A0DCdDIZceW0cGKWxgARjFfgkqJturp+rC5rvsguas6DZGS6k7ykiHVV3qcdfTtQfdNv 9w0+NmnmZFYkmLQFLkY+Nf/BpYQISssTJ204+HMwkniy+VYuKaFeG6O7wxEYzQ== Date: Fri, 4 Apr 2025 11:23:00 +0800 Message-ID: <23fcef43612216d58882c304ec255d2fbb816509.1743736516.git.hako@ultrarare.space> In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=2a01:4f8:10b:392::42; envelope-from=hako@ultrarare.space; helo=mx.boiledscript.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/system.scm (operating-system-etc-service)[profile]: Set up extra environment variables for Guix Home. * gnu/home/services/shells.scm (add-shell-profile-file): Skip setup-environment if already finished. * gnu/home/services.scm (environment-variables->setup-environment-script): Skip initializing home profile if already finished. Change-Id: Ife4100c6b19f61272525eebc82931c81784fe9e0 --- gnu/home/services.scm | 6 +++++- gnu/home/services/shells.scm | 6 +++++- gnu/system.scm | 5 +++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gnu/home/services.scm b/gnu/home/services.scm index 85a43f80ca..6be1a49a90 100644 --- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -279,7 +279,11 @@ (define (environment-variables->setup-environment-script vars) # ~/.profile does) GUIX_PROFILE=\"$HOME_ENVIRONMENT/profile\" PROFILE_FILE=\"$GUIX_PROFILE/etc/profile\" -[ -f $PROFILE_FILE ] && . $PROFILE_FILE +# Skip if already initialized. +case $INFOPATH in + *$GUIX_PROFILE/share/info*) ;; + *) [ -f \"$PROFILE_FILE\" ] && . \"$PROFILE_FILE\" ;; +esac case $GUIX_LOCPATH in *$GUIX_PROFILE/lib/locale*) ;; diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index bab5730c3d..35c0c52a8e 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -88,7 +88,11 @@ (define (add-shell-profile-file config) "shell-profile" "\ HOME_ENVIRONMENT=$HOME/.guix-home -. $HOME_ENVIRONMENT/setup-environment +# Skip if already sourced. +case $INFOPATH in + *$HOME_ENVIRONMENT/profile/share/info*) ;; + *) . \"$HOME_ENVIRONMENT/setup-environment\" ;; +esac $HOME_ENVIRONMENT/on-first-login unset HOME_ENVIRONMENT\n" (serialize-configuration diff --git a/gnu/system.scm b/gnu/system.scm index 46e6729e74..b67d26b648 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1148,6 +1148,11 @@ (define* (operating-system-etc-service os) esac done +# Set up extra environment variables for Guix Home. +HOME_ENVIRONMENT=\"$HOME/.guix-home\" +[ -f \"$HOME_ENVIRONMENT/setup-environment\" ] && . \"$HOME_ENVIRONMENT/setup-environment\" +unset HOME_ENVIRONMENT + # Prepend search paths not in a profile. export PATH=/run/privileged/bin:$PATH export XCURSOR_PATH=\"$HOME/.icons:$XCURSOR_PATH\" From patchwork Fri Apr 4 03:23:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 41261 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3569827BBE2; Fri, 4 Apr 2025 04:25:01 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI, PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED 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 C768727BBEC for ; Fri, 4 Apr 2025 04:24:58 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u0XfF-0006xj-5V; Thu, 03 Apr 2025 23:24:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xf6-0006vb-11 for guix-patches@gnu.org; Thu, 03 Apr 2025 23:24:08 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u0Xf5-0002lz-CD; Thu, 03 Apr 2025 23:24:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=KBfXMoYrTKnp336HbrqSH0vt0n8oYOd2N4/8TUJiN80=; b=C+Zu+DBo9akyPuhTXBLTjoxUroZKhXulzealm7yKzkmG+3fuaJvrgKyy1nCKtRtbHOiu/KEz81FgV94q/qSaxNMVUsTbv/bvs6IsRrj4QWFWckbuKEmIZ4VDoLUuEKM19S0ZWsbE/NttCFPzi/CcytSTs+EGlLK41+wRcSs1iEHhU8WORLeWyXtZIfUMVpnyxMqz+c3bqxnyc+JXQEZyG4maH5JGYoED/7EiYLEtxayqf7VNPsDo816iBvh803jrTUkNoTQwv2+xvW7vkdKwpRL8OI+XmmOoFx3+QWTjwxfERAZ5HaZCm2UmrufdfqX1oRnlGSZN9NPWnFSzsdgKOA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u0Xf3-0002cW-62; Thu, 03 Apr 2025 23:24:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77524] [PATCH v4 4/6] system & home: profile: Address issues reported by =?utf-8?b?4oCYc2hlbGxjaGVja+KAmS4=?= Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, hako@ultrarare.space, janneke@gnu.org, ludo@gnu.org, tanguy@bioneland.org, guix-patches@gnu.org Resent-Date: Fri, 04 Apr 2025 03:24:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77524 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77524@debbugs.gnu.org Cc: Hilton Chain , Andrew Tropin , Hilton Chain , Janneke Nieuwenhuizen , Ludovic =?utf-8?q?Court=C3=A8s?= , Tanguy Le Carrour X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Andrew Tropin , Hilton Chain , Janneke Nieuwenhuizen , Ludovic =?utf-8?q?Court=C3=A8s?= , Tanguy Le Carrour Received: via spool by submit@debbugs.gnu.org id=B.174373703610001 (code B ref -1); Fri, 04 Apr 2025 03:24:04 +0000 Received: (at submit) by debbugs.gnu.org; 4 Apr 2025 03:23:56 +0000 Received: from localhost ([127.0.0.1]:36544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0Xeu-0002b9-2H for submit@debbugs.gnu.org; Thu, 03 Apr 2025 23:23:56 -0400 Received: from lists.gnu.org ([2001:470:142::17]:32936) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u0Xeq-0002aC-Vu for submit@debbugs.gnu.org; Thu, 03 Apr 2025 23:23:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xel-0006tG-Kv for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:47 -0400 Received: from mx.boiledscript.com ([88.99.243.112]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xej-0002iM-G1 for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:47 -0400 From: Hilton Chain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=mail; t=1743737023; h=from:from: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; bh=KBfXMoYrTKnp336HbrqSH0vt0n8oYOd2N4/8TUJiN80=; b=IszScpr73bD4wpjVvkyg6KHPU/4C1qRTQ8DjZCLjcpPanC85qTkl6MTile69BwReBhsStJ 0prmOASNBht41IVtlBv2UGajLmxbuWMNsrwxHDmyDq6F1hyoB8voF8kSXLYVgb9jIrnaFP 6lTG049g7yXKpQdMpBCXKaRQcy16ORjPZyhIDTwfSSHJz/6TOB7Pc2EAgnao4fGIxEvWOp cSyn/sC4tsgTIiAiMflulCybHOVVsVQh6nthgmWwLuO28L8seJ8SSRq+B54Jbf/fkwd8+k OhH3poPuVb8LLhH20GlhW3fDrJ47Mts63zHPQwIMRmcgxFasR7K53t6TTcLztg== Date: Fri, 4 Apr 2025 11:23:01 +0800 Message-ID: <949ac4740c8aa6e91b4b1a3c724d9394c2335127.1743736516.git.hako@ultrarare.space> In-Reply-To: References: MIME-Version: 1.0 X-MS-Reactions: disallow Received-SPF: pass client-ip=88.99.243.112; envelope-from=hako@ultrarare.space; helo=mx.boiledscript.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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/system.scm (operating-system-etc-service)[profile]: Address issues reported by ‘shellcheck’. * gnu/home/services.scm (environment-variables->setup-environment-script): Likewise. * gnu/home/services/shells.scm (add-shell-profile-file): Likewise. Change-Id: I4e230fd239b8a8450da6ee0c2e58746c9cc38785 --- gnu/home/services.scm | 16 ++++++++++------ gnu/home/services/shells.scm | 4 ++-- gnu/system.scm | 10 +++++----- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/gnu/home/services.scm b/gnu/home/services.scm index 6be1a49a90..769bc1c033 100644 --- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -287,27 +287,31 @@ (define (environment-variables->setup-environment-script vars) case $GUIX_LOCPATH in *$GUIX_PROFILE/lib/locale*) ;; - *) export GUIX_LOCPATH=$GUIX_PROFILE/lib/locale:$GUIX_LOCPATH ;; + *) export GUIX_LOCPATH=\"$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH\" ;; esac case $XDG_DATA_DIRS in *$GUIX_PROFILE/share*) ;; - *) export XDG_DATA_DIRS=$GUIX_PROFILE/share:$XDG_DATA_DIRS ;; + *) export XDG_DATA_DIRS=\"$GUIX_PROFILE/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS\" ;; esac +# When MANPATH is unset, add a trailing colon so the system default search path +# is used. case $MANPATH in *$GUIX_PROFILE/share/man*) ;; - *) export MANPATH=$GUIX_PROFILE/share/man:$MANPATH + *) export MANPATH=\"$GUIX_PROFILE/share/man:$MANPATH\" ;; esac +# When INFOPATH is unset, add a trailing colon so Emacs searches +# 'Info-default-directory-list'. case $INFOPATH in *$GUIX_PROFILE/share/info*) ;; - *) export INFOPATH=$GUIX_PROFILE/share/info:$INFOPATH ;; + *) export INFOPATH=\"$GUIX_PROFILE/share/info:$INFOPATH\" ;; esac case $XDG_CONFIG_DIRS in *$GUIX_PROFILE/etc/xdg*) ;; - *) export XDG_CONFIG_DIRS=$GUIX_PROFILE/etc/xdg:$XDG_CONFIG_DIRS ;; + *) export XDG_CONFIG_DIRS=\"$GUIX_PROFILE/etc/xdg${XDG_CONFIG_DIRS:+:}$XDG_CONFIG_DIRS\" ;; esac case $XCURSOR_PATH in *$GUIX_PROFILE/share/icons*) ;; - *) export XCURSOR_PATH=$GUIX_PROFILE/share/icons:$XCURSOR_PATH ;; + *) export XCURSOR_PATH=\"$GUIX_PROFILE/share/icons${XCURSOR_PATH:+:}$XCURSOR_PATH\" ;; esac # Keep the shell environment clean. diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index 35c0c52a8e..97c9331e18 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -87,13 +87,13 @@ (define (add-shell-profile-file config) ,(mixed-text-file "shell-profile" "\ -HOME_ENVIRONMENT=$HOME/.guix-home +HOME_ENVIRONMENT=\"$HOME/.guix-home\" # Skip if already sourced. case $INFOPATH in *$HOME_ENVIRONMENT/profile/share/info*) ;; *) . \"$HOME_ENVIRONMENT/setup-environment\" ;; esac -$HOME_ENVIRONMENT/on-first-login +\"$HOME_ENVIRONMENT/on-first-login\" unset HOME_ENVIRONMENT\n" (serialize-configuration config diff --git a/gnu/system.scm b/gnu/system.scm index b67d26b648..cf93ea0fcb 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1071,11 +1071,11 @@ (define* (operating-system-etc-service os) # loaded when someone logs in via SSH. See . # We need 'PATH' to be defined here, for 'cat' and 'cut'. Do this before # reading the user's 'etc/profile' to allow variables to be overridden. -if [ -f /etc/environment -a -n \"$SSH_CLIENT\" \\ - -a -z \"$LINUX_MODULE_DIRECTORY\" ] +if [ -f /etc/environment ] && [ -n \"$SSH_CLIENT\" ] && + [ -z \"$LINUX_MODULE_DIRECTORY\" ] then . /etc/environment - export `/run/current-system/profile/bin/cut -d= -f1 < /etc/environment` + export \"$(/run/current-system/profile/bin/cut -d= -f1 < /etc/environment)\" fi # Set up environment for all default profiles. @@ -1154,10 +1154,10 @@ (define* (operating-system-etc-service os) unset HOME_ENVIRONMENT # Prepend search paths not in a profile. -export PATH=/run/privileged/bin:$PATH +export PATH=\"/run/privileged/bin:$PATH\" export XCURSOR_PATH=\"$HOME/.icons:$XCURSOR_PATH\" -if [ -n \"$BASH_VERSION\" -a -f /etc/bashrc ] +if [ -n \"$BASH_VERSION\" ] && [ -f /etc/bashrc ] then # Load Bash-specific initialization code. . /etc/bashrc From patchwork Fri Apr 4 03:23:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 41258 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1330027BBEA; Fri, 4 Apr 2025 04:24:49 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI, PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 62F3127BBE2 for ; Fri, 4 Apr 2025 04:24:48 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u0XfC-0006wp-3T; Thu, 03 Apr 2025 23:24:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xf6-0006vg-PL for guix-patches@gnu.org; Thu, 03 Apr 2025 23:24:11 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u0Xf6-0002mG-Ag for guix-patches@gnu.org; Thu, 03 Apr 2025 23:24:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=2Klkhi6hIObdEXUoc1WrSi6YuLCRK/lw5odfrGdGnLQ=; b=kjC3LWzasp7zjWM3cmY/3nVMvmOBY9l2NZfb3KA/NSr8VbaujWGrR2XFbqtFm0rx+slI1b4IWafFYXiJWqNH2IdOCmH9adLCvNDGek6vubA7TlzjQqg+7JU2FeXhYsQ0o3PcTmqHbUiDi7ccXLm/S6b16EACwDJ+WTmE+4hE1IACg1TTYWFYzP3cvoNATFYTrmN14AcumQKarRIvo5tSCNQZdwq9kY0ULDVeYwCXl2EGbTBb9jSUdYBL6JLZZsiOeI2X4WiFLkEhJNwLYroom320F2Ek9IN9qD7N0A7a+tBUzx3fT2S9Z1ryrqTX3PJ2qxbOXFjYDG9AdyV7d9g/2w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u0Xf6-0002dN-3s for guix-patches@gnu.org; Thu, 03 Apr 2025 23:24:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77527] [PATCH v4 5/6] guix-install.sh: Group profile sourcing. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Apr 2025 03:24:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77527 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77527@debbugs.gnu.org Cc: Hilton Chain X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174373703710016 (code B ref -1); Fri, 04 Apr 2025 03:24:07 +0000 Received: (at submit) by debbugs.gnu.org; 4 Apr 2025 03:23:57 +0000 Received: from localhost ([127.0.0.1]:36548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0Xev-0002bP-9Z for submit@debbugs.gnu.org; Thu, 03 Apr 2025 23:23:57 -0400 Received: from lists.gnu.org ([2001:470:142::17]:32952) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u0Xes-0002aK-15 for submit@debbugs.gnu.org; Thu, 03 Apr 2025 23:23:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xem-0006tY-NZ for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:48 -0400 Received: from mx.boiledscript.com ([88.99.243.112]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xel-0002is-0o for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:48 -0400 From: Hilton Chain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=mail; t=1743737025; h=from:from: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; bh=2Klkhi6hIObdEXUoc1WrSi6YuLCRK/lw5odfrGdGnLQ=; b=iJeElmZWjhtwr0uefZ0SmUGJ5X7lpagswx4NJ0VJPGHbXmsPrJ/Fx9Q5G4aoRjK/Hi+JG4 RjOF1yewbHXGCRTPcaLe0/kwcLVSIrzJMpH5aCDB+I23dyqRpy4xZIEJ30CcQuHaAS2/Lx LZO6eAsq2TgVc8AoRGMZ1DM9KwNYcW9gdJSEuT0sQ0VqzPG6v4UlhxBq6atXMwQsh39y2H 9B78nh3h+wdS2/gvSaAXKhwWmQYZu+P8u8j3+F01kcOALU751SLTVH7sbPaVYiGBdb6Phi TeNJxIweAPXpF4WCYJiIx0CUlEs+NbHcOwfVpxxTSq+da8CbxTF7YYcNrzpCdg== Date: Fri, 4 Apr 2025 11:23:02 +0800 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-MS-Reactions: disallow Received-SPF: pass client-ip=88.99.243.112; envelope-from=hako@ultrarare.space; helo=mx.boiledscript.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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * etc/guix-install.sh (sys_create_init_profile): Group sourcing of all default profiles. Change-Id: Ia443b78a5ba656b7d03e1abbba53c4bf1240e338 --- etc/guix-install.sh | 69 +++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index b5d833cd64..f0d37bc384 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -749,47 +749,54 @@ export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:-/etc/xdg}" export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" # no default for XDG_RUNTIME_DIR (depends on foreign distro for semantics) -# `guix pull` profile -GUIX_PROFILE="$HOME/.config/guix/current" -export PATH="$GUIX_PROFILE/bin${PATH:+:}$PATH" -# Add to INFOPATH and MANPATH so the latest Guix documentation is available to -# info and man readers. When INFOPATH is unset, add a trailing colon so Emacs -# searches 'Info-default-directory-list'. When MANPATH is unset, add a -# trailing colon so the system default search path is used. -export INFOPATH="$GUIX_PROFILE/share/info:$INFOPATH" -export MANPATH="$GUIX_PROFILE/share/man:$MANPATH" -# Expose the latest Guix modules to Guile so guix shell and repls spawned by -# e.g. Geiser work out of the box. -export GUILE_LOAD_PATH="$GUIX_PROFILE/share/guile/site/3.0${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH" -export GUILE_LOAD_COMPILED_PATH="$GUIX_PROFILE/lib/guile/3.0/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH" - -# User's default profile, if it exists -GUIX_PROFILE="$HOME/.guix-profile" -if [ -L "$GUIX_PROFILE" ]; then - . "$GUIX_PROFILE/etc/profile" - - # see info '(guix) Application Setup' - export GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH" - - # Documentation search paths may be handled by $GUIX_PROFILE/etc/profile if - # the user installs info and man readers via Guix. If the user doesn’t, - # explicitly add to them so documentation for software from ‘guix install’ - # is available to the system info and man readers. +# Set up environment for all default profiles. +for GUIX_PROFILE in "$HOME/.guix-home/profile" \ + "$HOME/.guix-profile" \ + "$HOME/.config/guix/current" +do + if [ -f "$GUIX_PROFILE/etc/profile" ]; then + . "$GUIX_PROFILE/etc/profile" + if [ ! \"$GUIX_PROFILE\" = \"$HOME/.config/guix/current\" ]; then + # See info '(guix) Application Setup'. + case $GUIX_LOCPATH in + *GUIX_PROFILE/lib/locale*) ;; + *) export GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH" ;; + esac + fi + fi + if [ \"$GUIX_PROFILE\" = \"$HOME/.config/guix/current\" ]; then + # Expose the latest Guix modules to Guile so guix shell and repls spawned by + # e.g. Geiser work out of the box. + case $GUILE_LOAD_PATH in + *$GUIX_PROFILE/share/guile/site/3.0*) ;; + *) export GUILE_LOAD_PATH=\"$GUIX_PROFILE/share/guile/site/3.0${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH\" ;; + esac + case $GUILE_LOAD_COMPILED_PATH in + *$GUIX_PROFILE/lib/guile/3.0/site-ccache*) ;; + *) export GUILE_LOAD_COMPILED_PATH=\"$GUIX_PROFILE/lib/guile/3.0/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH\" ;; + esac + fi + # Make basic things just work when the user installs their first package. + case $PATH in + *$GUIX_PROFILE/bin*) ;; + *) export PATH="$GUIX_PROFILE/bin${PATH:+:}$PATH" ;; + esac + # Add to INFOPATH and MANPATH so the latest Guix documentation is available to + # info and man readers. When INFOPATH is unset, add a trailing colon so Emacs + # searches 'Info-default-directory-list'. When MANPATH is unset, add a + # trailing colon so the system default search path is used. case $INFOPATH in *$GUIX_PROFILE/share/info*) ;; *) export INFOPATH="$GUIX_PROFILE/share/info:$INFOPATH" ;; esac case $MANPATH in *$GUIX_PROFILE/share/man*) ;; - *) export MANPATH="$GUIX_PROFILE/share/man:$MANPATH" + *) export MANPATH="$GUIX_PROFILE/share/man:$MANPATH" ;; esac -fi +done # NOTE: Guix Home handles its own profile initialization in ~/.profile. See # info '(guix) Configuring the Shell'. - -# Clean up after ourselves. -unset GUIX_PROFILE EOF } From patchwork Fri Apr 4 03:23:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 41259 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2409D27BBEE; Fri, 4 Apr 2025 04:24:59 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI, PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 C05C427BBEA for ; Fri, 4 Apr 2025 04:24:58 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u0XfF-0006xm-DZ; Thu, 03 Apr 2025 23:24:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xf7-0006vj-Jl for guix-patches@gnu.org; Thu, 03 Apr 2025 23:24:11 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u0Xf7-0002mW-B6 for guix-patches@gnu.org; Thu, 03 Apr 2025 23:24:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=QygalKEFyewEa5m3Y7fIyfO3rlKva0YRO9cu4ZPHP3A=; b=TWihdLUGTxmGbK4PNUldeKkF+VkLzGrjLaBfVhR5DvcU6HKG3RzttltWUP3hf09KVFxfm6/9nvlKKySEyYxVosYUGhYR4sxzhAEsqVpq/vkgwD8AQbmsA2ocEAQnPFkjtUf+5DNVe3XzCoBZ1jSJbitKm65takhlAkYKOsahLXIc+nCtF110B8tbIVLLJHQfXezPOsUtXvruZrPR8m5NLnOPINIRoqMLQ2PjypcmKyAiOHIyYh0GLr24aG/dcdvxjvHWpfs1uMm4h2PfWAoNYJmBbn2nQCoULJ9b3jGkeiAEXvWASF3KeCaX/k9J2721ReqAP2oKOaq8hMA20V9uMg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u0Xf7-0002dc-4d for guix-patches@gnu.org; Thu, 03 Apr 2025 23:24:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77528] [PATCH v4 6/6] guix-install.sh: Set up extra environment variables for Guix Home. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Apr 2025 03:24:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77528 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77528@debbugs.gnu.org Cc: Hilton Chain X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174373704010028 (code B ref -1); Fri, 04 Apr 2025 03:24:08 +0000 Received: (at submit) by debbugs.gnu.org; 4 Apr 2025 03:24:00 +0000 Received: from localhost ([127.0.0.1]:36550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0Xex-0002bf-Ru for submit@debbugs.gnu.org; Thu, 03 Apr 2025 23:24:00 -0400 Received: from lists.gnu.org ([2001:470:142::17]:32956) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u0Xet-0002aV-Q7 for submit@debbugs.gnu.org; Thu, 03 Apr 2025 23:23:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xeo-0006ty-9l for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:50 -0400 Received: from mx.boiledscript.com ([88.99.243.112]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xem-0002jG-Q2 for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:50 -0400 From: Hilton Chain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=mail; t=1743737027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QygalKEFyewEa5m3Y7fIyfO3rlKva0YRO9cu4ZPHP3A=; b=XJb9yqkWMj/4cGuZLiyYaf7zi77ka59a7GcbxmLEtVlAfsAd8ZhJS8x53HC3pLI04nq/dG zQBs1d1fEEFx5gd3qfPq4Mx/Lw3AFhf2sCdzxo3ZCdTmL78XGbtD/x+lT6UBSuqTCLa8Ys 98qyfarkSCcEpahS8aqLwwS9X3kqW8EzZq3lxz4vk60dKZOxg+rluz0AjUMRQcxs1kYOxq DbccJmxxZu9jYfRUfRb059e/KciGJHKvxM0MKmh1xlL0M/KsMY+UI5Aeg5ovL833RGKX5E 9l+anpb6X/vP7RLZPQ+h62rnvRuN9Wy7TJsEnthrhYjvqHBr5q41jn9rR4WdRQ== Date: Fri, 4 Apr 2025 11:23:03 +0800 Message-ID: <48e2fe38e67f7d7384fde358adb04c1e2b3a6abe.1743736516.git.hako@ultrarare.space> In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=88.99.243.112; envelope-from=hako@ultrarare.space; helo=mx.boiledscript.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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * etc/guix-install.sh (sys_create_init_profile): Set up extra environment variables for Guix Home. Change-Id: If0508bf7c87947d89982ad17cabfbf1024a209d0 --- etc/guix-install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index f0d37bc384..aabfb4dda4 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -795,8 +795,10 @@ do esac done -# NOTE: Guix Home handles its own profile initialization in ~/.profile. See -# info '(guix) Configuring the Shell'. +# Set up extra environment variables for Guix Home. +HOME_ENVIRONMENT=$HOME/.guix-home +[ -f "$HOME_ENVIRONMENT/setup-environment" ] && . "$HOME_ENVIRONMENT/setup-environment" +unset HOME_ENVIRONMENT EOF }