unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* installing packages in Guix System
@ 2022-02-16 19:52 Gottfried
  2022-02-17 11:03 ` Daniel Meißner
  2022-02-18  1:50 ` Gary Johnson
  0 siblings, 2 replies; 3+ messages in thread
From: Gottfried @ 2022-02-16 19:52 UTC (permalink / raw)
  To: help-guix

I started to read the manual, but didn´t yet come across this.

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?

Gottfried

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: installing packages in Guix System
  2022-02-16 19:52 installing packages in Guix System Gottfried
@ 2022-02-17 11:03 ` Daniel Meißner
  2022-02-18  1:50 ` Gary Johnson
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Meißner @ 2022-02-17 11:03 UTC (permalink / raw)
  To: Gottfried; +Cc: help-guix

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
         (cups-configuration
          (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.

Best,

-- 
Daniel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: installing packages in Guix System
  2022-02-16 19:52 installing packages in Guix System Gottfried
  2022-02-17 11:03 ` Daniel Meißner
@ 2022-02-18  1:50 ` Gary Johnson
  1 sibling, 0 replies; 3+ messages in thread
From: Gary Johnson @ 2022-02-18  1:50 UTC (permalink / raw)
  To: Gottfried; +Cc: help-guix

Gottfried <gottfried@posteo.de> 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?

These are the standard steps to update your packages on Guix System:

NOTE: You should run all of these commands as your regular (non-root)
      user account. There is no need to install packages as root on Guix
      System. Doing so is usually a sign of confusion by the user.

1. Download and build the latest version of the guix package manager.
   This will also download the most up-to-date collection of package
   recipes to your computer. However, it will not update any of the
   packages that you have already installed. It only updates the guix
   command.

   $ guix pull

2. Update all of the packages that you have already installed in your
   user profile by asking guix to rebuild all of those which have
   updated package recipes. This will also rebuild any packages that you
   have installed whose dependencies have updated package recipes.

   $ guix package -u

3. Update all of the packages and services that you have installed
   system-wide with your config.scm file. This is the file that contains
   your operating-system declaration. Note that you need to use sudo for
   this command, but you should run it as your regular (non-root) user.
   Otherwise, you will not be using the latest version of the guix
   command that you just downloaded in step 1.

   $ sudo guix system reconfigure config.scm

4. Be happy! You are done. ;)

> 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?

Every package that you install with the guix command is installed under
/gnu/store. The reason that you can use these commands as though they
were installed in the usual Linux locations (e.g., /bin, /sbin/,
/usr/bin, /usr/local/bin, /opt) is because the guix command creates a
web of symlinks under ~/.config/guix/current and ~/.guix-profile which
point at the files you installed under /gnu/store.

The bin directories within these two symlink directories are
automatically added to your $PATH environment variable on Guix System,
which ensures that your shell will be able to find and use all of these
programs under /gnu/store.

If you want to configure system services (e.g., printing server,
database server, web server, gemini server, tor server, ssh server,
...other servers..., and some other magical, non-server one-shot
things), you have to add entries for these services to your config.scm
file along with the relevant configuration settings for these services.

When you run the command in step 3 above, the packages for these
services will be installed under /gnu/store and then service entries for
each of them will be added to Sheperd, which is Guix System's service
manager.

You can interact with Sheperd services using the herd command like so:

$ sudo herd status

$ sudo herd status cups

I hope this information was clear and helpful.

Have fun and happy hacking!

 ~Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
=======================================================================
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-18  2:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16 19:52 installing packages in Guix System Gottfried
2022-02-17 11:03 ` Daniel Meißner
2022-02-18  1:50 ` Gary Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).