[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
75/75: gnu: services: Start X with -configdir.
From: |
Mark H. Weaver |
Subject: |
75/75: gnu: services: Start X with -configdir. |
Date: |
Wed, 24 Feb 2016 16:51:39 +0000 |
mhw pushed a commit to branch media-updates
in repository guix.
commit 79fd74facd96956f62721927e84ab77caa168a9f
Author: Andy Wingo <address@hidden>
Date: Thu Feb 18 21:34:37 2016 +0100
gnu: services: Start X with -configdir.
* gnu/services/xorg.scm (%default-xorg-modules): New public variable.
(xorg-configuration-directory): New function.
(xorg-start-command): Add #:modules keyword argument, defaulting to
%default-xorg-modules. Build an xorg.conf.d directory from those
modules, and pass it to X via the -configdir parameter.
---
gnu/services/xorg.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index a93dbfe..980b5a6 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 address@hidden)))
+
+ (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
- 34/75: gnu: xf86-input-evdev: Update to 2.10.1., (continued)
- 34/75: gnu: xf86-input-evdev: Update to 2.10.1., Mark H. Weaver, 2016/02/24
- 56/75: gnu: xgamma: Update to 1.0.6., Mark H. Weaver, 2016/02/24
- 50/75: gnu: xf86-video-sis: Update to 0.10.8., Mark H. Weaver, 2016/02/24
- 66/75: gnu: xproto: Update to 7.0.28., Mark H. Weaver, 2016/02/24
- 71/75: gnu: xorg-server: Update to 1.18.1., Mark H. Weaver, 2016/02/24
- 51/75: gnu: xf86-video-tdfx: Update to 1.4.6., Mark H. Weaver, 2016/02/24
- 25/75: gnu: randrproto: Update to 1.5.0., Mark H. Weaver, 2016/02/24
- 44/75: gnu: xf86-video-mga: Update to 1.6.4., Mark H. Weaver, 2016/02/24
- 62/75: gnu: xmodmap: Update to 1.0.9., Mark H. Weaver, 2016/02/24
- 45/75: gnu: xf86-video-neomagic: Update to 1.2.9., Mark H. Weaver, 2016/02/24
- 75/75: gnu: services: Start X with -configdir.,
Mark H. Weaver <=
- 40/75: gnu: xf86-video-cirrus: Update to 1.5.3., Mark H. Weaver, 2016/02/24
- 48/75: gnu: xf86-video-savage: Update to 2.3.8., Mark H. Weaver, 2016/02/24
- 57/75: gnu: xhost: Update to 1.0.7., Mark H. Weaver, 2016/02/24
- 58/75: gnu: xinput: Update to 1.6.2., Mark H. Weaver, 2016/02/24
- 73/75: gnu: libxt: Update to 1.1.5., Mark H. Weaver, 2016/02/24
- 68/75: gnu: libxrandr: Update to 1.5.0., Mark H. Weaver, 2016/02/24