Subject: [bug#77035] [PATCH 0/2] home: setup-environment: Avoid prepending duplicated PATH.

From: Hilton Chain <[email-masked]>
Date: Sat, 15 Mar 2025 21:23:22 +0800

Hi Guix,

Here's a patch series following my comments in https://issues.guix.gnu.org/63009#10,

Currently on a Guix System, PATH entries is in the following order:
--8<---------------cut here---------------start------------->8---
~/.guix-home/profile/bin
~/.guix-home/profile/sbin
/run/privileged/bin
~/.config/guix/current/bin
~/.guix-home/profile/bin
~/.guix-home/profile/sbin
~/.guix-profile/bin
~/.guix-profile/sbin
/run/current-system/profile/bin
/run/current-system/profile/sbin
--8<---------------cut here---------------end--------------->8---

With this change, it will be changed to:
--8<---------------cut here---------------start------------->8---
/run/privileged/bin
~/.config/guix/current/bin
~/.guix-profile/bin
~/.guix-profile/sbin
~/.guix-home/profile/bin
~/.guix-home/profile/sbin
/run/current-system/profile/bin
/run/current-system/profile/sbin
--8<---------------cut here---------------end--------------->8---

I haven't changed guix-install.sh yet, so the following remains on foregin
distros:
--8<---------------cut here---------------start------------->8---
~/.guix-home/profile/bin
~/.guix-home/profile/sbin
~/.guix-profile/bin
~/.guix-profile/sbin
--8<---------------cut here---------------end--------------->8---

If you agree with [PATCH 1/2], I'll change guix-install.sh too.

Thanks

Hilton Chain (2):
  gnu: system: Order imperative profiles first in etc/profile.
  home: setup-environment: Avoid prepending duplicated PATH.

 gnu/home/services.scm | 14 +++++++++++++-
 gnu/system.scm        |  6 +++---
 2 files changed, 16 insertions(+), 4 deletions(-)

base-commit: 3cc51c3e7447ab4f590d530fa66f65b6152ab109
--
2.48.1