2016-11-15 04:06:47 +08:00
|
|
|
GNU Guix provides state-of-the-art package management features such as
|
|
|
|
transactional upgrades and roll-backs, reproducible build environments,
|
|
|
|
unprivileged package management, and per-user profiles. It uses low-level
|
|
|
|
mechanisms from the Nix package manager, but packages are defined as
|
|
|
|
native Guile modules, using extensions to the Scheme language -- which
|
|
|
|
makes it nicely hackable.
|
2015-11-25 18:59:55 +08:00
|
|
|
|
2016-11-15 04:06:47 +08:00
|
|
|
Guix may be run in single or multi-user mode (which requires the
|
|
|
|
guix-daemon). To have the guix daemon start and stop with your host,
|
|
|
|
add to /etc/rc.d/rc.local:
|
2015-11-25 18:59:55 +08:00
|
|
|
|
|
|
|
if [ -x /etc/rc.d/rc.guix ]; then
|
2016-11-15 04:06:47 +08:00
|
|
|
/etc/rc.d/rc.guix start
|
2015-11-25 18:59:55 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
and to /etc/rc.d/rc.local_shutdown (creating it if needed):
|
|
|
|
|
|
|
|
if [ -x /etc/rc.d/rc.guix ]; then
|
2016-11-15 04:06:47 +08:00
|
|
|
/etc/rc.d/rc.guix stop
|
2015-11-25 18:59:55 +08:00
|
|
|
fi
|
|
|
|
|
2016-11-15 04:06:47 +08:00
|
|
|
The daemon requires users for building the guix packages, which should
|
|
|
|
be added under the 'guixbuild' group.
|
2015-11-25 18:59:55 +08:00
|
|
|
|
2015-12-09 08:55:18 +08:00
|
|
|
groupadd -g 316 guixbuild
|
2015-11-25 18:59:55 +08:00
|
|
|
for i in `seq -w 1 10`; do
|
2015-12-09 08:55:18 +08:00
|
|
|
useradd -G guixbuild \
|
2015-11-25 18:59:55 +08:00
|
|
|
-d /var/empty -s `which nologin` \
|
2015-12-09 08:55:18 +08:00
|
|
|
-c "Guix build user $i" -u 316 -g 316 \
|
2015-11-25 18:59:55 +08:00
|
|
|
guixbuilder$i;
|
|
|
|
done
|
|
|
|
|
2016-11-15 04:06:47 +08:00
|
|
|
Restricting access to the daemon to only users in the guixbuild group
|
|
|
|
is acheived by setting file permissions for the daemon's socket's folder.
|
2015-11-25 18:59:55 +08:00
|
|
|
|
|
|
|
chgrp guixbuild /var/guix/daemon-socket
|
|
|
|
chmod ug=rwx,o= /var/guix/daemon-socket
|
|
|
|
|
2016-11-15 04:06:47 +08:00
|
|
|
Correct permissions must also be set for /var/guix/profiles to give
|
|
|
|
users access.
|
2015-11-25 18:59:55 +08:00
|
|
|
|
2016-11-15 04:06:47 +08:00
|
|
|
By default guix will compile in /tmp, this can be changed by exporting
|
|
|
|
$TMPDIR. Guix will also by default store its packages in /gnu/store, to
|
|
|
|
save space in the root partition /gnu can be mounted on another partition.
|
2015-11-25 18:59:55 +08:00
|
|
|
|
2016-11-15 04:06:47 +08:00
|
|
|
Guix can either be built with the nix-daemon instead of the default
|
|
|
|
guix-daemon or along side nix sharing the same store, both require nix
|
|
|
|
as an optional dependency. To build with the nix-daemon use NIX="yes"
|
|
|
|
and to share the store with nix use SHARE="yes".
|
2015-12-09 08:55:18 +08:00
|
|
|
|
2016-11-15 04:06:47 +08:00
|
|
|
guile-json is an optional dependency and will allow you to use the 'guix
|
|
|
|
import pypi' command. It is of interest primarily for developers and
|
|
|
|
not for casual users.
|