[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: installing packages in Guix System

From: Daniel Meißner
Subject: Re: installing packages in Guix System
Date: Thu, 17 Feb 2022 12:03:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi Gottfried,

Gottfried writes:

> When you install a package in an other Linux distro, it will be
> available in the system.
> In guix it is different. I installed e.g. hplip,
> system-config-printer,cups, cups-filters, but additionally I have to
> add the printer settings in the /etc/config.scm file.
> Could somebody explain it to me why?
> When I installed printer packages, where do they go? Is the guix
> system on a different level and it needs also to be configured
> additionally?

In most Linux distributions installing a package such as cups with the
package manager results also in it being configured and started by the
init system (systemd for example).  This is not the case with Guix:

Installing a package via ‘guix install’ simply builds it, installs the
contents under /gnu/store and updates the current user’s profile to
include a reference to the newly installed package.  In addition to each
user’s profile (~/.guix-profile) there can also be other profiles, for
example the system profile (/run/current-system/profile).  If you list
packages in the ‘packages’ field of an operation-system declaration,
they will be installed to the system profile.

However, Guix can also be used to configure a whole operating system.
This means it can generate configuration files for the various packages
for you such that you can have, for example, cups started automatically
by the init system.  This configuration, however, is separate from the
package installation and is done in the operating-system declaration in
(/etc/config.scm, for example).  This is why you must add the

(service cups-service-type
          (web-interface? #t)))

to the list of services in the ‘services’ field of your operating-system
declaration, in order to tell Guix to start Cups with the web interface
enabled.  Note that the program cupsd, that starts the daemon, is
neither necessarily in any user profile nor in the system profile.
However, the init system has a direct link to the binary located in the
/gnu/store directory.

Hope that brings some clarity.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]