guix-patches
[Top][All Lists]
Advanced

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

[bug#50967] [PATCH 10/12] gnu: home-services: Change %service-type-path


From: Oleg Pykhalov
Subject: [bug#50967] [PATCH 10/12] gnu: home-services: Change %service-type-path and filter services.
Date: Sat, 2 Oct 2021 16:46:01 +0300

* gnu/home-services.scm
(%service-type-path): Search home services in "gnu/services".
* gnu/home-services.scm (fold-home-service-types): Filter home services.
---
 gnu/home-services.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/home-services.scm b/gnu/home-services.scm
index 9f1e986616..bc4b857715 100644
--- a/gnu/home-services.scm
+++ b/gnu/home-services.scm
@@ -512,7 +512,7 @@ environment, and its configuration file, when available.")))
 
 (define %service-type-path
   ;; Search path for service types.
-  (make-parameter `((,%guix-home-root-directory . "gnu/home-services"))))
+  (make-parameter `((,%guix-home-root-directory . "gnu/services"))))
 
 (define (all-home-service-modules)
   "Return the default set of home-service modules."
@@ -521,4 +521,9 @@ environment, and its configuration file, when available.")))
                      #:warn warn-about-load-error)))
 
 (define* (fold-home-service-types proc seed)
-  (fold-service-types proc seed (all-home-service-modules)))
+  (filter (match-lambda
+            ((service-type . _)
+             (string-prefix? "home-"
+                             (symbol->string
+                              (service-type-name service-type)))))
+          (fold-service-types proc seed (all-home-service-modules))))
-- 
2.33.0






reply via email to

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