From 1361584983b7e53f5eadd1815d1a2b81b387e6ad Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 5 Apr 2019 17:51:28 +0200 Subject: services: localed: Do nothing for unconfigured keyboards. * gnu/services/xorg.scm (localed-service-type)[package]: Return the empty list when the 'keyboard-layout' field is #f. [compose]: Use 'find' instead of 'first'. --- gnu/services/xorg.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index d0e6c7cd5c..d4e73c13b4 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -707,7 +707,12 @@ makes the good ol' XlockMore usable." '())) (define localed-service-type - (let ((package (compose list localed-configuration-localed))) + (let ((package (lambda (config) + ;; Don't bother if the user didn't specify any keyboard + ;; layout. + (if (localed-configuration-keyboard-layout config) + (list (localed-configuration-localed config)) + '())))) (service-type (name 'localed) (extensions (list (service-extension dbus-root-service-type @@ -720,7 +725,8 @@ makes the good ol' XlockMore usable." ;; This service can be extended, typically by the X login ;; manager, to communicate the chosen Xorg keyboard layout. - (compose first) + (compose (lambda (extensions) + (find keyboard-layout? extensions))) (extend (lambda (config keyboard-layout) (localed-configuration (inherit config) -- cgit v1.2.3