diff options
author | Marius Bakke <mbakke@fastmail.com> | 2020-01-21 21:34:41 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2020-01-21 21:34:41 +0100 |
commit | 715110a8a2e9e4b1a89635950744eb5260b8ee7f (patch) | |
tree | 0d0e4c41631092a068d8b0823f4d6b0a8d725eed /etc/guix-install.sh | |
parent | b3c2ebda5bcedcfb88475e53b7f36c3a42cac8b4 (diff) | |
parent | 79e074ea10875ff75ca613179c70de12d64b19f5 (diff) | |
download | patches-715110a8a2e9e4b1a89635950744eb5260b8ee7f.tar patches-715110a8a2e9e4b1a89635950744eb5260b8ee7f.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'etc/guix-install.sh')
-rwxr-xr-x | etc/guix-install.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 111e25fbcb..b57d71981f 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -393,6 +393,26 @@ sys_authorize_build_farms() done } +sys_create_init_profile() +{ # Create /etc/profile.d/guix.sh for better desktop integration + cat <<"EOF" > /etc/profile.d/guix.sh +# _GUIX_PROFILE: `guix pull` profile +_GUIX_PROFILE="$HOME/.config/guix/current" +[ -L $_GUIX_PROFILE ] && export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH" + +# GUIX_PROFILE: User's default profile +GUIX_PROFILE="$HOME/.guix-profile" +[ -L $GUIX_PROFILE ] || return +GUIX_LOCPATH="$GUIX_PROFILE/lib/locale" +export GUIX_PROFILE GUIX_LOCPATH + +eval `guix package --search-paths=prefix 2> /dev/null` + +# set XDG_DATA_DIRS to include Guix installations +export XDG_DATA_DIRS="$GUIX_PROFILE/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS" +EOF +} + welcome() { cat<<"EOF" @@ -449,6 +469,7 @@ main() sys_create_build_user sys_enable_guix_daemon sys_authorize_build_farms + sys_create_init_profile _msg "${INF}cleaning up ${tmp_path}" rm -r "${tmp_path}" |