summaryrefslogtreecommitdiff
path: root/gnu/services/xorg.scm
diff options
context:
space:
mode:
authorChris Marusich <cmmarusich@gmail.com>2022-01-06 18:43:47 -0800
committerChris Marusich <cmmarusich@gmail.com>2022-01-06 18:54:59 -0800
commit79260c8695cc5e3cd64f5b01e262369d5a67f141 (patch)
tree59e99e36845052a754bd64fb826218d21f8b1c8d /gnu/services/xorg.scm
parentc4240dfdb433239108edaf12acb5c51138f9dc74 (diff)
services: Consistently use SDDM rather than GDM on non-x86_64.
This is a follow-up to 49599fab564f203b8e92d32e9b28c99e99849bfb. Fixes: <https://issues.guix.gnu.org/52908>. * gnu/services/xorg.scm (set-xorg-configuration)[login-manager-service-type]: When the current system or target system begins with the string "x86_64", use gdm-service-type as before; otherwise, use sddm-service-type. * gnu/system/examples/vm-image.tmpl (services): Add sddm-service-type to the list of service types to remove.
Diffstat (limited to 'gnu/services/xorg.scm')
-rw-r--r--gnu/services/xorg.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 82a7d25602..35f8dbc5f8 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2021 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2021 Josselin Poiret <josselin.poiret@protonmail.ch>
+;;; Copyright © 2022 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -28,6 +29,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu services xorg)
+ #:autoload (gnu services sddm) (sddm-service-type)
#:use-module (gnu artwork)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
@@ -1040,10 +1042,17 @@ the GNOME desktop environment.")
"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 (gdm -> gnome-shell -> gjs -> mozjs -> rust)
+;; and Rust is currently unavailable on non-x86_64 platforms, default to
+;; SDDM there (FIXME).
(define* (set-xorg-configuration config
#:optional
(login-manager-service-type
- gdm-service-type))
+ (let ((system (or (%current-target-system)
+ (%current-system))))
+ (if (string-prefix? "x86_64" system)
+ gdm-service-type
+ sddm-service-type))))
"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