guix-commits
[Top][All Lists]
Advanced

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

06/09: home: Migrate fountutils and xdg modules to xdg-configuration-fil


From: guix-commits
Subject: 06/09: home: Migrate fountutils and xdg modules to xdg-configuration-files.
Date: Sun, 20 Mar 2022 14:06:51 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 3c149de46199aa67407e2f365485361f0bb686e4
Author: Andrew Tropin <andrew@trop.in>
AuthorDate: Fri Feb 11 15:34:46 2022 +0300

    home: Migrate fountutils and xdg modules to xdg-configuration-files.
    
    * gnu/home/services/fontutils.scm (home-fontconfig-service-type): Migrate to
    xdg-configuration-files.
    * gnu/home/services/xdg.scm (home-xdg-user-directories-service-type,
    home-xdg-mime-applications-service-type): Migrate to 
xdg-configuration-files.
    
    Signed-off-by: Ludovic Court├Ęs <ludo@gnu.org>
---
 gnu/home/services/fontutils.scm |  4 ++--
 gnu/home/services/xdg.scm       | 31 +++++++++++++++++--------------
 2 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/gnu/home/services/fontutils.scm b/gnu/home/services/fontutils.scm
index 772904367d..6062eaed6a 100644
--- a/gnu/home/services/fontutils.scm
+++ b/gnu/home/services/fontutils.scm
@@ -34,7 +34,7 @@
 ;;; Code:
 
 (define (add-fontconfig-config-file he-symlink-path)
-  `(("config/fontconfig/fonts.conf"
+  `(("fontconfig/fonts.conf"
      ,(mixed-text-file
        "fonts.conf"
        "<?xml version='1.0'?>
@@ -51,7 +51,7 @@
   (service-type (name 'home-fontconfig)
                 (extensions
                  (list (service-extension
-                        home-files-service-type
+                        home-xdg-configuration-files-service-type
                         add-fontconfig-config-file)
                        (service-extension
                         home-run-on-change-service-type
diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm
index 2833198cdf..361a2a6148 100644
--- a/gnu/home/services/xdg.scm
+++ b/gnu/home/services/xdg.scm
@@ -190,11 +190,11 @@ pre-populated content.")
    "Default directory for videos."))
 
 (define (home-xdg-user-directories-files-service config)
-  `(("config/user-dirs.conf"
+  `(("user-dirs.conf"
      ,(mixed-text-file
        "user-dirs.conf"
        "enabled=False\n"))
-    ("config/user-dirs.dirs"
+    ("user-dirs.dirs"
      ,(mixed-text-file
        "user-dirs.dirs"
       (serialize-configuration
@@ -218,7 +218,7 @@ pre-populated content.")
   (service-type (name 'home-xdg-user-directories)
                 (extensions
                  (list (service-extension
-                        home-files-service-type
+                        home-xdg-configuration-files-service-type
                         home-xdg-user-directories-files-service)
                        (service-extension
                         home-activation-service-type
@@ -417,7 +417,7 @@ that the application cannot open the specified MIME type.")
    "A list of XDG desktop entries to create.  See
 @code{xdg-desktop-entry}."))
 
-(define (home-xdg-mime-applications-files-service config)
+(define (home-xdg-mime-applications-files config)
   (define (add-xdg-desktop-entry-file entry)
     (let ((file (first entry))
           (config (second entry)))
@@ -425,16 +425,16 @@ that the application cannot open the specified MIME 
type.")
           (apply mixed-text-file
                  (format #f "xdg-desktop-~a-entry" file)
                  config))))
+  (map (compose add-xdg-desktop-entry-file serialize-xdg-desktop-entry)
+       (home-xdg-mime-applications-configuration-desktop-entries config)))
 
-  (append
-   `(("config/mimeapps.list"
-      ,(mixed-text-file
-        "xdg-mime-appplications"
-        (serialize-configuration
-         config
-         home-xdg-mime-applications-configuration-fields))))
-   (map (compose add-xdg-desktop-entry-file serialize-xdg-desktop-entry)
-        (home-xdg-mime-applications-configuration-desktop-entries config))))
+(define (home-xdg-mime-applications-xdg-files config)
+  `(("mimeapps.list"
+     ,(mixed-text-file
+       "xdg-mime-appplications"
+       (serialize-configuration
+        config
+        home-xdg-mime-applications-configuration-fields)))))
 
 (define (home-xdg-mime-applications-extension old-config extension-configs)
   (define (extract-fields config)
@@ -469,7 +469,10 @@ that the application cannot open the specified MIME type.")
                 (extensions
                  (list (service-extension
                         home-files-service-type
-                        home-xdg-mime-applications-files-service)))
+                        home-xdg-mime-applications-files)
+                       (service-extension
+                        home-xdg-configuration-files-service-type
+                        home-xdg-mime-applications-xdg-files)))
                 (compose identity)
                 (extend home-xdg-mime-applications-extension)
                 (default-value (home-xdg-mime-applications-configuration))



reply via email to

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