mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-23 19:19:20 -05:00
services: Add 'xorg-server-service-type'.
* gnu/services/xorg.scm (xorg-server-service-type): New service type. (xorg-server-profile-service): New procedure.
This commit is contained in:
parent
af06582d6c
commit
e429325d37
1 changed files with 37 additions and 0 deletions
|
@ -45,6 +45,7 @@ (define-module (gnu services xorg)
|
|||
#:use-module (gnu packages admin)
|
||||
#:use-module (gnu packages bash)
|
||||
#:use-module (gnu system shadow)
|
||||
#:use-module (guix build-system trivial)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix store)
|
||||
#:use-module (guix packages)
|
||||
|
@ -70,6 +71,7 @@ (define-module (gnu services xorg)
|
|||
xorg-wrapper
|
||||
xorg-start-command
|
||||
xinitrc
|
||||
xorg-server-service-type
|
||||
|
||||
%default-slim-theme
|
||||
%default-slim-theme-name
|
||||
|
@ -483,6 +485,41 @@ (define-syntax handle-xorg-configuration
|
|||
(xorg-configuration xorg-configuration))
|
||||
config)))))))
|
||||
|
||||
(define (xorg-server-profile-service config)
|
||||
;; XXX: profile-service-type only accepts <package> objects.
|
||||
(list
|
||||
(package
|
||||
(name "xorg-wrapper")
|
||||
(version (package-version xorg-server))
|
||||
(source (xorg-wrapper config))
|
||||
(build-system trivial-build-system)
|
||||
(arguments
|
||||
'(#:modules ((guix build utils))
|
||||
#:builder
|
||||
(begin
|
||||
(use-modules (guix build utils))
|
||||
(let* ((source (assoc-ref %build-inputs "source"))
|
||||
(out (assoc-ref %outputs "out"))
|
||||
(bin (string-append out "/bin")))
|
||||
(mkdir-p bin)
|
||||
(symlink source (string-append bin "/X"))
|
||||
(symlink source (string-append bin "/Xorg"))
|
||||
#t))))
|
||||
(home-page (package-home-page xorg-server))
|
||||
(synopsis (package-synopsis xorg-server))
|
||||
(description (package-description xorg-server))
|
||||
(license (package-license xorg-server)))))
|
||||
|
||||
(define xorg-server-service-type
|
||||
(service-type
|
||||
(name 'xorg-server)
|
||||
(extensions
|
||||
(list (service-extension profile-service-type
|
||||
xorg-server-profile-service)))
|
||||
(default-value (xorg-configuration))
|
||||
(description "Add @command{X} to the system profile, to be used with
|
||||
@command{sx} or @command{xinit}.")))
|
||||
|
||||
|
||||
;;;
|
||||
;;; SLiM log-in manager.
|
||||
|
|
Loading…
Reference in a new issue