From 0cf981a6066711f6e830a3f1d40f7c265b0bac94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 5 Apr 2019 17:40:01 +0200 Subject: 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 305a732a0a19c5810aab401aa7d70eba02ac386b. * gnu/services/xorg.scm (gdm-service-type)[compose]: Handle the case where EXTENSIONS is empty. [extend]: Handle the case where XORG-CONFIGURATION is #f. --- gnu/services/xorg.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 26ca0d4f1f..ede8bc7304 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -879,11 +879,16 @@ the GNOME desktop environment.") ;; For convenience, this service can be extended with an ;; 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 -- cgit v1.2.3