services: gdm: Properly handle empty extensions lists.

Fixes a bug whereby not extending GDM would lead us to do:

  (first '())

in the 'compose' method.

Regression introduced in 305a732a0a.

* gnu/services/xorg.scm (gdm-service-type)[compose]: Handle the case
where EXTENSIONS is empty.
[extend]: Handle the case where XORG-CONFIGURATION is #f.
This commit is contained in:
Ludovic Courtès 2019-04-05 17:40:01 +02:00
parent 37aaf9a8c7
commit 0cf981a606
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 9 additions and 4 deletions

View File

@ -879,11 +879,16 @@ the GNOME desktop environment.")
;; For convenience, this service can be extended with an
;; <xorg-configuration> record. Take the first one that
;; comes.
(compose first)
(compose (lambda (extensions)
(match extensions
(() #f)
((config . _) config))))
(extend (lambda (config xorg-configuration)
(gdm-configuration
(inherit config)
(xorg-configuration xorg-configuration))))
(if xorg-configuration
(gdm-configuration
(inherit config)
(xorg-configuration xorg-configuration))
config)))
(default-value (gdm-configuration))
(description