summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRutherther <rutherther@ditigal.xyz>2025-12-22 09:10:41 +0100
committerRutherther <rutherther@ditigal.xyz>2025-12-22 23:00:41 +0100
commit9e7e40b8bd1410dfcad6cbface22b1c31e665401 (patch)
treee4055fc9224fc35627bf309c6a1d86233c860bef /gnu
parent08016049908b732c1b26922fe47bd3c2755100f6 (diff)
services: xorg: Return only supported packages in %default-xorg-modules.
The xorg modules are used inside of services that's thunked. So we can make them depend on the %current-system. * gnu/services/xorg.scm (default-xorg-modules): New variable. (%default-xorg-modules): Return result of (default-xorg-modules). Change-Id: I10f722e52d598ce3e83ef3f200b3bd953bc08e17 Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/xorg.scm48
1 files changed, 30 insertions, 18 deletions
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index b32a960bcf6..25f44566beb 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -64,6 +64,7 @@
#:use-module ((guix modules) #:select (source-module-closure))
#:use-module (guix packages)
#:use-module (guix derivations)
+ #:use-module (guix platform)
#:use-module (guix records)
#:use-module (guix deprecation)
#:use-module (guix utils)
@@ -148,25 +149,36 @@
;;;
;;; Code:
-(define %default-xorg-modules
- ;; Default list of modules loaded by the server. When multiple drivers
- ;; match, the first one in the list is loaded.
- (list xf86-video-vesa
- xf86-video-fbdev
- xf86-video-amdgpu
- xf86-video-ati
- xf86-video-cirrus
- xf86-video-intel
- xf86-video-mach64
- xf86-video-nouveau
- xf86-video-nv
- xf86-video-sis
+(define* (default-xorg-modules
+ #:optional
+ (system (or (and=>
+ (%current-target-system)
+ platform-target->system)
+ (%current-system))))
+ "Default list of modules loaded by the server. When multiple drivers match,
+the first one in the list is loaded."
+ ;; Return only supported packages, because some aren't supported
+ ;; on all architectures.
+ (filter (cut supported-package? <> system)
+ (list xf86-video-vesa
+ xf86-video-fbdev
+ xf86-video-amdgpu
+ xf86-video-ati
+ xf86-video-cirrus
+ xf86-video-intel
+ xf86-video-mach64
+ xf86-video-nouveau
+ xf86-video-nv
+ xf86-video-sis
- ;; Libinput is the new thing and is recommended over evdev/synaptics:
- ;; <http://who-t.blogspot.fr/2015/01/xf86-input-libinput-compatibility-with.html>.
- xf86-input-libinput
- xf86-input-evdev
- xf86-input-mouse))
+ ;; Libinput is the new thing and is recommended over evdev/synaptics:
+ ;; <http://who-t.blogspot.fr/2015/01/xf86-input-libinput-compatibility-with.html>.
+ xf86-input-libinput
+ xf86-input-evdev
+ xf86-input-mouse)))
+
+(define-syntax %default-xorg-modules
+ (identifier-syntax (default-xorg-modules)))
(define %default-xorg-fonts
;; Default list of fonts available to the X server.