summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-12-08 15:41:00 +0100
committerLudovic Courtès <ludo@gnu.org>2021-12-08 18:56:52 +0100
commit49599fab564f203b8e92d32e9b28c99e99849bfb (patch)
treeb0d0f114a0f25f69c77011ad8cb6bd2660d48e6d /gnu/services
parent24ead149dbadbaad56f22a89b394bc6fcdc73b52 (diff)
downloadguix-patches-49599fab564f203b8e92d32e9b28c99e99849bfb.tar
guix-patches-49599fab564f203b8e92d32e9b28c99e99849bfb.tar.gz
services: %desktop-services: Use SDDM rather than GDM on non-x86_64.
This works around the fact that Rust is currently unavailable in Guix on platforms other than x86_64-linux: https://lists.gnu.org/archive/html/guix-devel/2021-11/msg00197.html * gnu/services/desktop.scm (desktop-services-for-system): New procedure. (%desktop-services): Turn into a macro.
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/desktop.scm18
1 files changed, 15 insertions, 3 deletions
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 612d548eea..c6761ca784 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014-2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
@@ -40,6 +40,7 @@
#:use-module (gnu services sound)
#:use-module ((gnu system file-systems)
#:select (%elogind-file-systems file-system))
+ #:autoload (gnu services sddm) (sddm-service-type)
#:use-module (gnu system)
#:use-module (gnu system setuid)
#:use-module (gnu system shadow)
@@ -1187,9 +1188,17 @@ or setting its password with passwd.")))
;;; The default set of desktop services.
;;;
-(define %desktop-services
+(define* (desktop-services-for-system #:optional
+ (system (or (%current-target-system)
+ (%current-system))))
;; List of services typically useful for a "desktop" use case.
- (cons* (service gdm-service-type)
+
+ ;; 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).
+ (cons* (if (string-prefix? "x86_64" system)
+ (service gdm-service-type)
+ (service sddm-service-type))
;; Screen lockers are a pretty useful thing and these are small.
(screen-locker-service slock)
@@ -1248,4 +1257,7 @@ or setting its password with passwd.")))
%base-services))
+(define-syntax %desktop-services
+ (identifier-syntax (desktop-services-for-system)))
+
;;; desktop.scm ends here