guix-daemon program implements all the functionality to
access the store. This includes launching build processes, running the
garbage collector, querying the availability of a build result, etc. It
is normally run as
root like this:
# guix-daemon --build-users-group=guix-builder
For details on how to set it up, Setting Up the Daemon.
guix-daemon launches build processes under
different UIDs, taken from the build group specified with
--build-users-group. In addition, each build process is run in a
chroot environment that only contains the subset of the store that the
build process depends on, as specified by its derivation
(see derivation), plus a set of specific
system directories. By default, the latter contains /dev and
/dev/pts. Furthermore, on GNU/Linux, the build environment is a
container: in addition to having its own file system tree, it has
a separate mount name space, its own PID name space, network name space,
etc. This helps achieve reproducible builds (see Features).
The following command-line options are supported:
Take users from group to run build processes (see build users).
Do not use substitutes for build products. That is, always build things locally instead of allowing downloads of pre-built binaries.
By default substitutes are used, unless the client—such as the
guix package command—is explicitly invoked with
When the daemon runs with
--no-substitutes, clients can still
explicitly enable substitution via the
remote procedure call (see The Store).
Cache build failures. By default, only successful builds are cached.
Use n CPU cores to build each derivation;
0 means as many
The default value is
1, but it may be overridden by clients, such
--cores option of
guix build (see Invoking guix build).
The effect is to define the
NIX_BUILD_CORES environment variable
in the build process, which can then use it to exploit internal
parallelism—for instance, by running
Allow at most n build jobs in parallel. The default value is
Produce debugging output.
This is useful to debug daemon start-up issues, but then it may be
overridden by clients, for example the
--verbosity option of
guix build (see Invoking guix build).
Add dir to the build chroot.
Doing this may change the result of build processes—for instance if they use optional dependencies found in dir when it is available, and not otherwise. For that reason, it is not recommended to do so. Instead, make sure that each derivation declares all the inputs that it needs.
Disable chroot builds.
Using this option is not recommended since, again, it would allow build processes to gain access to undeclared dependencies.
Disable compression of the build logs.
--lose-logs is used, all the build logs are kept in the
localstatedir. To save space, the daemon automatically compresses
them with bzip2 by default. This option disables that.
Disable automatic file “deduplication” in the store.
By default, files added to the store are automatically “deduplicated”: if a newly added file is identical as another one found in the store, the daemon makes the new file a hard link to the other file. This slightly increases the input/output load at the end of a build process. This option disables this.
On Linux-based systems, impersonate Linux 2.6. This means that the
uname system call will report 2.6 as the release number.
This might be helpful to build programs that (usually wrongfully) depend on the kernel version number.
Do not keep build logs. By default they are kept under
Assume system as the current system type. By default it is the
architecture/kernel pair found at configure time, such as
Listen for connections on socket, the file name of a Unix-domain socket. The default socket is localstatedir/daemon-socket/socket. This option is only useful in exceptional circumstances, such as if you need to run several daemons on the same machine.