aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/xorg.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2016-02-25 13:50:19 -0500
committerMark H Weaver <mhw@netris.org>2016-02-25 13:50:19 -0500
commite62b5c690317ec6c5e35ce267b5c683bbd320342 (patch)
treef66227a16c9659f111aff5c5506f5494e5af1b7f /gnu/services/xorg.scm
parent0767f6a69e96185a9a8c6377ac946037b966d4c7 (diff)
parentbf6996c9cf94627f7c116dc0b9923fe0bf942663 (diff)
downloadguix-e62b5c690317ec6c5e35ce267b5c683bbd320342.tar
guix-e62b5c690317ec6c5e35ce267b5c683bbd320342.tar.gz
Merge branch 'media-updates'
Diffstat (limited to 'gnu/services/xorg.scm')
-rw-r--r--gnu/services/xorg.scm45
1 files changed, 45 insertions, 0 deletions
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index a93dbfe7c4..980b5a6ba5 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -40,6 +40,7 @@
#:use-module (srfi srfi-26)
#:use-module (ice-9 match)
#:export (xorg-configuration-file
+ %default-xorg-modules
xorg-start-command
%default-slim-theme
%default-slim-theme-name
@@ -137,9 +138,52 @@ EndSection
"\n"
extra-config))
+(define %default-xorg-modules
+ (list xf86-video-vesa
+ xf86-video-fbdev
+ xf86-video-modesetting
+ xf86-video-cirrus
+ xf86-video-intel
+ xf86-video-mach64
+ xf86-video-nouveau
+ xf86-video-nv
+ xf86-video-sis
+ xf86-input-libinput
+ xf86-input-evdev
+ xf86-input-keyboard
+ xf86-input-mouse
+ xf86-input-synaptics))
+
+(define (xorg-configuration-directory modules)
+ "Return a directory that contains the @code{.conf} files for X.org that
+includes the @code{share/X11/xorg.conf.d} directories of each package listed
+in @var{modules}."
+ (computed-file "xorg.conf.d"
+ #~(begin
+ (use-modules (guix build utils)
+ (srfi srfi-1))
+
+ (define files
+ (append-map (lambda (module)
+ (find-files (string-append
+ module
+ "/share/X11/xorg.conf.d")
+ "\\.conf$"))
+ (list #$@modules)))
+
+ (mkdir #$output)
+ (for-each (lambda (file)
+ (symlink file
+ (string-append #$output "/"
+ (basename file))))
+ files)
+ #t)
+ #:modules '((guix build utils))))
+
(define* (xorg-start-command #:key
(guile (canonical-package guile-2.0))
(configuration-file (xorg-configuration-file))
+ (modules %default-xorg-modules)
(xorg-server xorg-server))
"Return a derivation that builds a @var{guile} script to start the X server
from @var{xorg-server}. @var{configuration-file} is the server configuration
@@ -158,6 +202,7 @@ Usually the X server is started by a login manager."
"-logverbose" "-verbose"
"-xkbdir" (string-append #$xkeyboard-config "/share/X11/xkb")
"-config" #$configuration-file
+ "-configdir" #$(xorg-configuration-directory modules)
"-nolisten" "tcp" "-terminate"
;; Note: SLiM and other display managers add the