From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id kBADLy7fZGS8BQAASxT56A (envelope-from ) for ; Wed, 17 May 2023 16:05:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id WHgVLi7fZGTl/AAAG6o9tA (envelope-from ) for ; Wed, 17 May 2023 16:05:34 +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 8ADA13D086 for ; Wed, 17 May 2023 16:05:34 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzHmB-0001OQ-Vu; Wed, 17 May 2023 10:05:12 -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 1pzHm3-0001Mm-76 for bug-guix@gnu.org; Wed, 17 May 2023 10:05:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pzHm2-00020z-VU for bug-guix@gnu.org; Wed, 17 May 2023 10:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pzHm2-0002BN-Jw for bug-guix@gnu.org; Wed, 17 May 2023 10:05:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#20255: [PATCH 1/4] home: shells: Merge search-paths of multiple profiles. References: <877ftschjt.fsf@gmail.com> In-Reply-To: <877ftschjt.fsf@gmail.com> Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: , bug-guix@gnu.org Resent-Date: Wed, 17 May 2023 14:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20255 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 20255@debbugs.gnu.org Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , ( , Andrew Tropin , Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-Xcc: ( , Andrew Tropin , Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 20255-submit@debbugs.gnu.org id=B20255.16843322758317 (code B ref 20255); Wed, 17 May 2023 14:05:02 +0000 Received: (at 20255) by debbugs.gnu.org; 17 May 2023 14:04:35 +0000 Received: from localhost ([127.0.0.1]:50527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzHlb-0002A4-8l for submit@debbugs.gnu.org; Wed, 17 May 2023 10:04:35 -0400 Received: from mail.envs.net ([5.199.136.28]:38250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzHlN-000291-VI for 20255@debbugs.gnu.org; Wed, 17 May 2023 10:04:33 -0400 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 735D038A1431; Wed, 17 May 2023 14:04:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1684332261; bh=4lP/qre2fEH84WVMWGLGqsYIMtbrdYvn2xbmWwDrfGE=; h=From:To:Cc:Subject:Date:From; b=ip8PHuF/mPtSqAgAZg8dn00LNOYw7KyjQRpnDxKeDqAk0cT7ecgP7gZxTasDYyw1C K/hZeL4eWZyDbkdFX8X/XN6u3jfIUiK9zMYiGRMOfGsm4jtDOyGXN9ZGBPFz0PqsmQ JmtiohoRitgmqIiG3wc3RBwpMRdSp5pBEVjgiNIH+l/4Um8+RRQLiHM8GwTaGxWJsD b9fIryi2o26jfsBTiPL+fh/kEp9oR660A/DewBsjYARiH7vXWSvrgBv3YR34GUiyAI LI4dH08s4FowN2Rtee27iuXbePYCm4TTVVYs0vy5S+oUu9byTnPWYDdrj1uxEZ71Sj lo9vi2f+G4Lk9TeVybAJDrnqBGBqOFTtryJYISN7FwsN/icR6SEwMqCuhvm9NKExzV K6o9vbZTmGXUreZC1QeO/Z9CVjvWyuv+ZqC8/e4zg/Psoo854EKvQTXXM1FpH/I6GD GevxI0JnPBH937BkLnxqXlDs3PrLQ1fxW9efZJ19jlCEB0v+Ta4Vqn01mnvJPYny9C 7okJ19G9Q9ajRF9qM6Mraa2Ne0UoP8Hzjy9MaTHjEaabtqaalm2w6OXB8isCat6DF5 YC19pJH7+kObw5CoDy3leOv+yXP0iVFXsKeoe0GBryQwacMetBd8Of7W9iaK9skzPm yAZHXq/EcsbdRgKiM7aja2Z0= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id WuZSTcPUxNtm; Wed, 17 May 2023 14:04:18 +0000 (UTC) Received: from localhost (unknown [36.170.57.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Wed, 17 May 2023 14:04:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id bacb00de; Wed, 17 May 2023 14:04:18 +0000 (UTC) Date: Wed, 17 May 2023 22:04:08 +0800 Message-Id: <10665650174637a1b70629b864509a0a68920154.1684331588.git.iyzsong@member.fsf.org> X-Mailer: git-send-email 2.40.1 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: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: iyzsong@envs.net From: iyzsong--- via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684332334; a=rsa-sha256; cv=none; b=GywL/Mgm7HSx0e49TeG3EJmXRGa/6jmdx8Hs4UjDRlDHCSKqCg8bzkmeJuIKoESBqNgfzO I8tJRvq3IjN8JvFQ3e73FGE3lO4OCfRXCJ2wMlK1cegbfy2DEu4m4011/blEy6dmUSzreA jFxX+lx3lX/4aaG54I9SLRZeoaj7Jovw3Ey3qUP3gIj6fMG0s06WedMPWa/q7DFx7/U3Ky RKQ/fZPBTIIq8wZCS0I2PLOvhn+CVtR/YvV6DNkXNE9Ep6IhB4oFuj7vdd2XMwV0oDT202 GAuacTXtUuYnSNNM0iZGI5Lg6U72R8cP4vTCxQAWrAW+lNIOamButrtXgYSM3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=envs.net header.s=modoboa header.b="ip8PHuF/"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1684332334; h=from:from:sender:sender:reply-to: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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4lP/qre2fEH84WVMWGLGqsYIMtbrdYvn2xbmWwDrfGE=; b=kK3A+WzZeeBFT/D5DFZHB7HHU1f/TDP81ia8oVu3N/hOTUi3QXZhPM/hF0/9koQRMOarVS W8P0aI2J2bzcT1WchOV20XPiFDP5RtHl6HCSb52AApXi0oTYBn107GDzuRZl8oUYxE8+bz hsfb6H3t5WIK04yH0dVJxdxUZ3eA2n5nIqY70sGHWWWHTYRsZNpL7X/mCyEAX8B3kMp9vO X573Ffrk6GQOxHvYjRb1fKnPNnQNYIn4WAHHluC4vMrFsGyNmvOM5ITrv+SCFtJYlnqqMU qYGiTDg7o0LPEhzBjhsY2B+iWJ2NzxSFgfT6ObPkTkh2pFGPN+GnSsSYEZe35g== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=envs.net header.s=modoboa header.b="ip8PHuF/"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.19 X-Spam-Score: -2.19 X-Migadu-Queue-Id: 8ADA13D086 X-TUID: JcGd2sL7YVYR From: 宋文武 This is a followup to 40310efde9b4a4f2cf98081d6cd10f843685ebb6. * gnu/home/services.scm (environment-variables->setup-environment-script): Merge search-paths from multiple profiles via "guix package". * gnu/home/services/shells.scm (zsh-file-zprofile, add-bash-configuration): Adjust comments. --- gnu/home/services.scm | 14 ++++++++++---- gnu/home/services/shells.scm | 6 ++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/gnu/home/services.scm b/gnu/home/services.scm index b17a34d19d..3a061cf310 100644 --- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -260,11 +260,17 @@ (define (environment-variables->setup-environment-script vars) (lambda (port) (set-port-encoding! port "UTF-8") (display "\ -HOME_ENVIRONMENT=$HOME/.guix-home -GUIX_PROFILE=\"$HOME_ENVIRONMENT/profile\" -PROFILE_FILE=\"$HOME_ENVIRONMENT/profile/etc/profile\" -[ -f $PROFILE_FILE ] && . $PROFILE_FILE +# 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 +HOME_ENVIRONMENT=$HOME/.guix-home case $XDG_DATA_DIRS in *$HOME_ENVIRONMENT/profile/share*) ;; *) export XDG_DATA_DIRS=$HOME_ENVIRONMENT/profile/share:$XDG_DATA_DIRS ;; diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index f05f2221d6..7c8908083e 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -185,9 +185,8 @@ (define (zsh-file-zprofile config) (mixed-text-file "zprofile" "\ -# Set up the system, user profile, and related variables. +# Set up environment variables of profiles. source /etc/profile -# Set up the home environment profile. source ~/.profile # It's only necessary if zsh is a login shell, otherwise profiles will @@ -399,9 +398,8 @@ (define (add-bash-configuration config) ,(mixed-text-file "bash_profile" "\ -# Set up the system, user profile, and related variables. +# Set up environment variables of profiles. # /etc/profile will be sourced by bash automatically -# Set up the home environment profile. if [ -f ~/.profile ]; then source ~/.profile; fi # Honor per-interactive-shell startup file base-commit: cf82526ac400fe953ddfbf9d7458d62ea4871d10 -- 2.40.1