summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Jung Bauermann <bauermann@kolabnow.com>2025-12-12 15:21:29 -0300
committerRutherther <rutherther@ditigal.xyz>2025-12-20 13:37:08 +0100
commit09acdd314249385cff402adaa22c9e3e6ed0c69f (patch)
tree7b62d3b66f8d1d7de2ec35c6cdaae1497efcbc66
parent3c81c4b8b8a4f6d28faf540d7fa5c36772be15fc (diff)
etc: guix-install.sh: Set XDG_DATA_DIRS.
This allows better integration of packages installed by Guix with the foreign distro. E.g.: 1. .desktop files from applications installed by Guix can be found by the user's desktop environment. 2. Fonts installed in ~/.guix-profile/share/fonts can be found by GUI applications without having to install the fontconfig package, as the the "Application Setup" section of the manual recommends. * etc/guix-install.sh (sys_create_init_profile): Add $GUIX_PROFILE/share to XDG_DATA_DIRS. Change-Id: Iba74b0782ffbad64d64cc1c5889b04012963a3e0 Signed-off-by: Rutherther <rutherther@ditigal.xyz>
-rwxr-xr-xetc/guix-install.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 1d0e7fed107..41aa5bfa9f5 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -819,6 +819,11 @@ if [ -L "$GUIX_PROFILE" ]; then
*$GUIX_PROFILE/share/man*) ;;
*) export MANPATH="$GUIX_PROFILE/share/man:$MANPATH"
esac
+
+ case $XDG_DATA_DIRS in
+ *$GUIX_PROFILE/share*) ;;
+ *) export XDG_DATA_DIRS="$GUIX_PROFILE/share:$XDG_DATA_DIRS"
+ esac
fi
# NOTE: Guix Home handles its own profile initialization in ~/.profile. See