aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/xorg.scm
diff options
context:
space:
mode:
authorTomas Volf <~@wolfsden.cz>2024-05-30 20:29:53 +0200
committerArun Isaac <arunisaac@systemreboot.net>2024-05-30 22:40:23 +0100
commite51a930c5c5a8609b8656bf997ec853cc04391e7 (patch)
treeb368e2eb0dad3b090193a9123c95a3b584819fe1 /gnu/services/xorg.scm
parent8db1d51b0f58cb0e70ececb9abcf9e7cd5109b34 (diff)
downloadguix-e51a930c5c5a8609b8656bf997ec853cc04391e7.tar.gz
guix-e51a930c5c5a8609b8656bf997ec853cc04391e7.zip
services: xorg: Add startx-command-service-type.
* gnu/services/xorg.scm (startx-command-profile-service, startx-command-service-type): New variables. * doc/guix.texi (X Window): Document startx-command-service-type. Change-Id: Ia2a7c3b2d5ebf6bcfff40cb2640b17d3baf6eba0 Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
Diffstat (limited to 'gnu/services/xorg.scm')
-rw-r--r--gnu/services/xorg.scm33
1 files changed, 33 insertions, 0 deletions
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 0b9803c425..e7d8922d76 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -92,6 +92,7 @@
xorg-start-command-xinit
xinitrc
xorg-server-service-type
+ startx-command-service-type
%default-slim-theme
%default-slim-theme-name
@@ -496,6 +497,38 @@ therefore it works well when executed from tty."
(program-file "startx" exp))
+(define (startx-command-profile-service config)
+ ;; XXX: profile-service-type only accepts <package> objects.
+ (package
+ (name "startx-profile-package")
+ (version "0")
+ (source (xorg-start-command-xinit config))
+ (build-system trivial-build-system)
+ (arguments
+ (list
+ #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (guix build utils))
+ (let ((bin (string-append #$output "/bin")))
+ (mkdir-p bin)
+ (symlink #$source (string-append bin "/startx"))))))
+ (home-page #f)
+ (synopsis #f)
+ (description #f)
+ (license #f)))
+
+(define startx-command-service-type
+ (service-type
+ (name 'startx-command)
+ (extensions
+ (list (service-extension profile-service-type
+ (compose list startx-command-profile-service))))
+ (default-value (xorg-configuration))
+ (description "Add @command{startx} to the system profile.")))
+
+
+
(define* (xinitrc #:key fallback-session)
"Return a system-wide xinitrc script that starts the specified X session,
which should be passed to this script as the first argument. If not, the