mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
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'.
This commit is contained in:
parent
3ef3bdf1cd
commit
1361584983
1 changed files with 8 additions and 2 deletions
|
@ -707,7 +707,12 @@ (define keyboard-layout
|
|||
'()))
|
||||
|
||||
(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 @@ (define localed-service-type
|
|||
|
||||
;; 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)
|
||||
|
|
Loading…
Reference in a new issue