help-guix
[Top][All Lists]
Advanced

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

Re: error setting console font in system.scm


From: John Soo
Subject: Re: error setting console font in system.scm
Date: Sat, 13 Jun 2020 21:18:18 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hello Fullbert,

Fulbert <fulbert@bluewin.ch> writes:

>   Trying to change console font with the following in "services" section
> of my system configuration file :
>
> ----
>
>   (services (append (list
>
>         (service console-font-service-type
>           `(("tty3" . ,(file-append font-terminus 
> "/share/consolefonts/ter-128n"))))
>       ) %desktop-services))
>
> ----
>
> which results in the following error when reconfiguring the system :
>
> ----
> $ sudo guix system --dry-run reconfigure /etc/config.scm
> guix system: error: service 'console-font-tty3' provided more than once
> ----

This is because there is already a console-font-service-type in
%desktop-services. You will need to modify the existing service instead
like below. Note I have not tested this myself but something like it can be
found in the documentation of guile association lists

https://www.gnu.org/software/guile/manual/html_node/Adding-or-Setting-Alist-Entries.html

;; At the top of the file
(use-modules
  ...
  (ice-9 match))

;; Replace %desktop-services with this:

(modify-services %desktop-services
  (console-font-service-type
    configuration =>
    (map
      (match-lambda
        (("tty3" . f)
          `("tty3" . (file-append font-terminus 
"/share/consolefonts/ter-128n")))
        ((tty . font) `(,tty . ,font)))
      configuration)))

>   I probably missunderstand something and/or ill-format the
> configuration…?… Help appreciated.

No problem. The error message is saying that such a service would
conflict with the existing one. The aim of the snippet is to keep the
other tty fonts and update the one on tty3.

Hope that helps!

- John



reply via email to

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