[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#68289] [PATCH v2 2/3] services: xorg: Add startx-command-service-ty
From: |
Tomas Volf |
Subject: |
[bug#68289] [PATCH v2 2/3] services: xorg: Add startx-command-service-type. |
Date: |
Sat, 11 May 2024 15:26:24 +0200 |
* gnu/services/xorg.scm (startx-command-profile-service),
(startx-command-service-type): New variables.
(define-module): Export startx-command-service-type.
Change-Id: Ia2a7c3b2d5ebf6bcfff40cb2640b17d3baf6eba0
---
v2: New patch in v2.
gnu/services/xorg.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 11b9c36995..51fa6f619c 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -91,6 +91,7 @@ (define-module (gnu services xorg)
xorg-start-command-xinit
xinitrc
xorg-server-service-type
+ startx-command-service-type
%default-slim-theme
%default-slim-theme-name
@@ -496,6 +497,39 @@ (define* (xorg-start-command-xinit #:optional (config
(xorg-configuration)))
(program-file "startx" exp))
+(define (startx-command-profile-service config)
+ ;; XXX: profile-service-type only accepts <package> objects.
+ (list
+ (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
+ 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
--
2.41.0