guix-install.sh: Create an init profile during installation
authorPrafulla Giri <pratheblackdiamond@gmail.com>
Sat, 28 Dec 2019 07:03:52 +0000 (12:48 +0545)
committerLudovic Courtès <ludo@gnu.org>
Fri, 17 Jan 2020 16:28:57 +0000 (17:28 +0100)
commit30810aff713149d53cb25f36ae6d721ec66385da
treed78b94bec23c33458a2dbfebfb65f161983f614c
parent7b2a47a702b7393cd968640079f8703c932d1405
guix-install.sh: Create an init profile during installation

Create an init profile (/etc/profile.d/guix.sh) during installation for
better integration with foreign distros. This file, read by login-shells
sets a few environment variables (PATH, GUIX_PROFILE, GUIX_LOCALE, along
with XDG_DATA_DIRS) and makes guix-installed packages readily available
for the users. Other environment variables, as listed by `guix package
--search-paths=prefix`, are also exported.

Checks are in place to prevent the init profile from needlessly polluting
the user's environment.

* etc/guix-install.sh (sys_create_init_profile): New function to create
/etc/profile.d/guix.sh init profile.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
etc/guix-install.sh