From f85865a05aa3914a478a46e6f10a5ac442d793a2 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Mon, 2 Jan 2023 18:44:51 +0100 Subject: home: services: fontutils: Add service value. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/home/services/fontutils.scm (add-fontconfig-config-file): Add support for multiple paths; (home-fontconfig-service-type): Honor it; * doc/guix.texi (Fonts Services): Document it. Co-authored-by: Ludovic Courtès --- gnu/home/services/fontutils.scm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'gnu/home/services/fontutils.scm') diff --git a/gnu/home/services/fontutils.scm b/gnu/home/services/fontutils.scm index 6062eaed6a..3399cb7ec8 100644 --- a/gnu/home/services/fontutils.scm +++ b/gnu/home/services/fontutils.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Andrew Tropin ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2023 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,6 +22,7 @@ #:use-module (gnu home services) #:use-module (gnu packages fontutils) #:use-module (guix gexp) + #:use-module (srfi srfi-1) #:export (home-fontconfig-service-type)) @@ -33,15 +35,17 @@ ;;; ;;; Code: -(define (add-fontconfig-config-file he-symlink-path) +(define (add-fontconfig-config-file directories) `(("fontconfig/fonts.conf" ,(mixed-text-file "fonts.conf" - " + (apply string-append + `(" - - ~/.guix-home/profile/share/fonts -")))) +\n" ,@(map (lambda (directory) + (string-append " " directory "\n")) + directories) + "\n")))))) (define (regenerate-font-cache-gexp _) `(("profile/share/fonts" @@ -59,7 +63,9 @@ (service-extension home-profile-service-type (const (list fontconfig))))) - (default-value #f) + (compose concatenate) + (extend append) + (default-value '("~/.guix-home/profile/share/fonts")) (description "Provides configuration file for fontconfig and make fc-* utilities aware of font packages installed in Guix Home's profile."))) -- cgit v1.2.3