GNU bug report logs -
#77266
[PATCH] gnu: Merge xorg configurations when extending.
Previous Next
Reported by: Ian Eure <ian <at> retrospec.tv>
Date: Wed, 26 Mar 2025 04:25:02 UTC
Severity: normal
Tags: patch
Done: Ian Eure <ian <at> retrospec.tv>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* gnu/services/desktop.scm (desktop-services-for-system): Export.
* gnu/services/desktop.scm (set-xorg-configuration): Look for a
display-manager service in (desktop-services-for-system).
* gnu/services/desktop.scm (set-xorg-configuration): Remove TODO comment.
Change-Id: Iceda2d13d16435517cd92bcb49e6937ed096f392
---
gnu/services/desktop.scm | 1 +
gnu/services/xorg.scm | 25 ++++++++++++++++++-------
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index fe034cfa8f..f7fb3c5bf0 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -199,6 +199,7 @@ (define-module (gnu services desktop)
seatd-configuration
seatd-service-type
+ desktop-services-for-system
%desktop-services))
;;; Commentary:
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index cb933693b7..4aec265098 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2023 muradm <mail <at> muradm.net>
;;; Copyright © 2024 Zheng Junjie <873216071 <at> qq.com>
;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
+;;; Copyright © 2025 Ian Eure <ian <at> retrospec.tv>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -43,6 +44,7 @@ (define-module (gnu services xorg)
#:use-module (gnu system privilege)
#:use-module (gnu services base)
#:use-module (gnu services dbus)
+ #:use-module (gnu services desktop)
#:use-module (gnu packages base)
#:use-module (gnu packages guile)
#:use-module (gnu packages xorg)
@@ -139,6 +141,7 @@ (define-module (gnu services xorg)
gdm-configuration
gdm-service-type
+ xorg-configuration-service-type
handle-xorg-configuration
set-xorg-configuration))
@@ -1391,16 +1394,24 @@ (define gdm-service-type
"Run the GNOME Desktop Manager (GDM), a program that allows
you to log in in a graphical session, whether or not you use GNOME."))))
-;; Since GDM depends on Rust and Rust is not available on all platforms,
-;; use SDDM as the fall-back display manager.
-;; TODO: Switch the condition to take into account if Rust is supported and
-;; match the configuration in desktop-services-for-system.
+(define (xorg-configuration-service? s)
+ "Returns #t if @var{s} is a service carrying xorg configuration."
+ (let ((val (service-value s)))
+ (and (record? val)
+ (memq 'xorg-configuration
+ (record-type-fields (record-type-descriptor val))))))
+
+(define (xorg-configuration-service-type services)
+ "Return the service type of the first service in @var{services}
+which carries xorg configuration. "
+ (let ((lmst (find xorg-configuration-service? services)))
+ (when lmst (service-kind lmst))))
+
(define* (set-xorg-configuration config
#:optional
(login-manager-service-type
- (if (target-x86-64?)
- gdm-service-type
- sddm-service-type)))
+ (xorg-configuration-service-type
+ (desktop-services-for-system))))
"Tell the log-in manager (of type @var{login-manager-service-type}) to use
@var{config}, an <xorg-configuration> record."
(simple-service 'set-xorg-configuration
--
2.49.0
This bug report was last modified 48 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.