unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: John Soo <jsoo1@asu.edu>
To: Fulbert <fulbert@bluewin.ch>
Cc: help-guix@gnu.org
Subject: Re: error setting console font in system.scm
Date: Sat, 13 Jun 2020 21:18:18 -0700	[thread overview]
Message-ID: <87pna2z3ed.fsf@asu.edu> (raw)
In-Reply-To: <20200613143227.GB5347@bluewin.ch> (fulbert@bluewin.ch's message of "Sat, 13 Jun 2020 16:32:27 +0200")

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	other threads:[~2020-06-14  4:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-13 14:32 error setting console font in system.scm Fulbert
2020-06-14  4:18 ` John Soo [this message]
2020-06-14 15:50   ` Fulbert
2020-06-14 15:59     ` John Soo
  -- strict thread matches above, loose matches on Subject: below --
2020-06-13 13:53 Fulbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pna2z3ed.fsf@asu.edu \
    --to=jsoo1@asu.edu \
    --cc=fulbert@bluewin.ch \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).