unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#61358] [PATCH] system: default-skeletons: Merge search-paths of multiple profiles.
@ 2023-02-08  2:37 iyzsong--- via Guix-patches via
  2023-02-08  5:18 ` Liliana Marie Prikler
  2023-05-12 12:30 ` bug#61358: " 宋文武 via Guix-patches via
  0 siblings, 2 replies; 4+ messages in thread
From: iyzsong--- via Guix-patches via @ 2023-02-08  2:37 UTC (permalink / raw)
  To: 61358; +Cc: 宋文武

From: 宋文武 <iyzsong@member.fsf.org>

Fixes <https://issues.guix/gnu.org/20255>.

* gnu/system/shadow.scm (default-skeletons)[bash_profile, zprofile]:
Merge search-paths from multiple profiles via "guix package".
---
 gnu/system/shadow.scm | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 2e87928368..a46f53e784 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -152,11 +152,31 @@ (define (default-skeletons)
 
   (let ((profile (plain-file "bash_profile" "\
 # Honor per-interactive-shell startup file
-if [ -f ~/.bashrc ]; then . ~/.bashrc; fi\n"))
+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-profile \\
+-p /run/current-system/profile)\"
+
+# Prepend setuid programs.
+export PATH=/run/setuid-programs:$PATH
+"))
         (bashrc  %default-bashrc)
         (zprofile    (plain-file "zprofile" "\
 # Honor system-wide environment variables
-source /etc/profile\n"))
+source /etc/profile
+
+# Merge search-paths from multiple profiles, the order matters.
+eval \"$(guix package --search-paths \\
+-p $HOME/.config/guix/current \\
+-p $HOME/.guix-profile \\
+-p /run/current-system/profile)\"
+
+# Prepend setuid programs.
+export PATH=/run/setuid-programs:$PATH
+"))
         (xdefaults (plain-file "Xdefaults" "\
 XTerm*utf8: always
 XTerm*metaSendsEscape: true\n"))
-- 
2.39.1





^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-12 12:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08  2:37 [bug#61358] [PATCH] system: default-skeletons: Merge search-paths of multiple profiles iyzsong--- via Guix-patches via
2023-02-08  5:18 ` Liliana Marie Prikler
2023-02-08  7:20   ` 宋文武 via Guix-patches via
2023-05-12 12:30 ` bug#61358: " 宋文武 via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).