On Sat, Jun 13, 2020 at 09:18:18PM -0700, John Soo wrote: > Hello Fullbert, > > Fulbert <fulb...@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!
Indeed! It works now. Thank you for your Help John ! For this to work though, I just had to correct a typo : add a `comma` (to _unquote_, if I'm not wrong) before the `(file-append …`. So, for reference : ---- ;; 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.psf.gz"))) ((tty . font) `(,tty . ,font))) configuration))) ----