summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/base.scm21
-rw-r--r--gnu/services/desktop.scm9
-rw-r--r--gnu/services/xorg.scm10
3 files changed, 28 insertions, 12 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index e52950e3659..adda5ab9bb9 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1060,6 +1060,9 @@ to use as the tty. This is primarily useful for headless systems."
(with-imported-modules (source-module-closure
'((gnu build linux-boot))) ;for 'find-long-options'
#~(begin
+ (use-modules (gnu build linux-boot)
+ (srfi srfi-1))
+
;; console=device,options
;; device: can be tty0, ttyS0, lp0, ttyUSB0 (serial).
;; options: BBBBPNF. P n|o|e, N number of bits,
@@ -1083,7 +1086,20 @@ to use as the tty. This is primarily useful for headless systems."
(find-long-options "console" command)))
(specs (append agetty-specs console-specs)))
(match specs
- (() #f)
+ ;; Fallback to a physical console registered in /proc/consoles.
+ (() (let* ((consoles (read-linux-consoles))
+ (chosen-console
+ ;; Prioritize preferred, if none, choose any enabled.
+ (or (find (lambda (c)
+ (and (not (linux-console-virtual? c))
+ (linux-console-preferred? c)))
+ consoles)
+ (find (lambda (c)
+ (and (not (linux-console-virtual? c))
+ (linux-console-enabled? c)))
+ consoles))))
+ (and chosen-console
+ (linux-console-device chosen-console))))
((spec _ ...)
;; Extract device name from first spec.
(match (string-tokenize spec not-comma)
@@ -1111,7 +1127,8 @@ to use as the tty. This is primarily useful for headless systems."
(requirement (cons* 'user-processes 'host-name 'udev
shepherd-requirement))
- (modules '((ice-9 match) (gnu build linux-boot)))
+ (modules '((ice-9 match) (gnu build linux-boot)
+ (srfi srfi-1)))
(start
(with-imported-modules (source-module-closure
'((gnu build linux-boot)))
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 59dc5b34749..52f9acaafe2 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -2520,11 +2520,10 @@ applications needing access to be root.")
(%current-system))))
;; List of services typically useful for a "desktop" use case.
- ;; 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 use (supported-package? "rust") and make
- ;; a news entry about the change.
- (cons* (if (string-prefix? "x86_64" system)
+ ;; FIXME: Since GDM depends on more dependencies that do not build on i686,
+ ;; keep SDDM on it for the time being.
+ ;; XXX: When changing login manager, also change set-xorg-configuration
+ (cons* (if (target-64bit? system)
(service gdm-service-type)
(service sddm-service-type))
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 068ad68df5d..e679e6bc03d 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -1415,14 +1415,14 @@ polkit.addRule(function(action, subject) {
"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.
+
+;; FIXME: Since GDM depends on more dependencies that do not build on i686,
+;; keep SDDM on it for the time being.
+;; XXX: When changing this, also change desktop-services-for-system
(define* (set-xorg-configuration config
#:optional
(login-manager-service-type
- (if (target-x86-64?)
+ (if (target-64bit?)
gdm-service-type
sddm-service-type)))
"Tell the log-in manager (of type @var{login-manager-service-type}) to use