diff options
| author | Rutherther <rutherther@ditigal.xyz> | 2026-01-17 12:28:34 +0100 |
|---|---|---|
| committer | Rutherther <rutherther@ditigal.xyz> | 2026-01-19 18:51:12 +0100 |
| commit | 6d4cb99a15da7f4fd55f956c55f4f4aacfcc7742 (patch) | |
| tree | 32b7eb04e67a097ce5febe210e20e08f24976f93 | |
| parent | 010af50497144d7de0f3684ef4134aa2abfc03c6 (diff) | |
gnu: %desktop-services: Switch to GDM on 64-bit systems.
* gnu/services/desktop.scm
(desktop-services-for-system): Use gdm on all 64-bit systems.
* gnu/services/xorg.scm (set-xorg-configuration): Adapt to
desktop-services-for-system change.
* gnu/system/examples/desktop.tmpl: Determine the support of Gnome by checking
for supported package.
Fixes: #5388
Change-Id: I0d512a7c31188cea0335e66f00a6d65ae59d09a4
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
| -rw-r--r-- | gnu/services/desktop.scm | 9 | ||||
| -rw-r--r-- | gnu/services/xorg.scm | 10 | ||||
| -rw-r--r-- | gnu/system/examples/desktop.tmpl | 18 |
3 files changed, 19 insertions, 18 deletions
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.") | |||
| 2520 | (%current-system)))) | 2520 | (%current-system)))) |
| 2521 | ;; List of services typically useful for a "desktop" use case. | 2521 | ;; List of services typically useful for a "desktop" use case. |
| 2522 | 2522 | ||
| 2523 | ;; Since GDM depends on Rust and Rust is not available on all platforms, | 2523 | ;; FIXME: Since GDM depends on more dependencies that do not build on i686, |
| 2524 | ;; use SDDM as the fall-back display manager. | 2524 | ;; keep SDDM on it for the time being. |
| 2525 | ;; TODO: Switch the condition to use (supported-package? "rust") and make | 2525 | ;; XXX: When changing login manager, also change set-xorg-configuration |
| 2526 | ;; a news entry about the change. | 2526 | (cons* (if (target-64bit? system) |
| 2527 | (cons* (if (string-prefix? "x86_64" system) | ||
| 2528 | (service gdm-service-type) | 2527 | (service gdm-service-type) |
| 2529 | (service sddm-service-type)) | 2528 | (service sddm-service-type)) |
| 2530 | 2529 | ||
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 25f44566beb..d46236ef7e0 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm | |||
| @@ -1379,14 +1379,14 @@ polkit.addRule(function(action, subject) { | |||
| 1379 | "Run the GNOME Desktop Manager (GDM), a program that allows | 1379 | "Run the GNOME Desktop Manager (GDM), a program that allows |
| 1380 | you to log in in a graphical session, whether or not you use GNOME.")))) | 1380 | you to log in in a graphical session, whether or not you use GNOME.")))) |
| 1381 | 1381 | ||
| 1382 | ;; Since GDM depends on Rust and Rust is not available on all platforms, | 1382 | |
| 1383 | ;; use SDDM as the fall-back display manager. | 1383 | ;; FIXME: Since GDM depends on more dependencies that do not build on i686, |
| 1384 | ;; TODO: Switch the condition to take into account if Rust is supported and | 1384 | ;; keep SDDM on it for the time being. |
| 1385 | ;; match the configuration in desktop-services-for-system. | 1385 | ;; XXX: When changing this, also change desktop-services-for-system |
| 1386 | (define* (set-xorg-configuration config | 1386 | (define* (set-xorg-configuration config |
| 1387 | #:optional | 1387 | #:optional |
| 1388 | (login-manager-service-type | 1388 | (login-manager-service-type |
| 1389 | (if (target-x86-64?) | 1389 | (if (target-64bit?) |
| 1390 | gdm-service-type | 1390 | gdm-service-type |
| 1391 | sddm-service-type))) | 1391 | sddm-service-type))) |
| 1392 | "Tell the log-in manager (of type @var{login-manager-service-type}) to use | 1392 | "Tell the log-in manager (of type @var{login-manager-service-type}) to use |
diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl index 2d65f222947..afe5ae2d2ba 100644 --- a/gnu/system/examples/desktop.tmpl +++ b/gnu/system/examples/desktop.tmpl | |||
| @@ -3,7 +3,8 @@ | |||
| 3 | ;; for a "desktop" setup with GNOME and Xfce where the | 3 | ;; for a "desktop" setup with GNOME and Xfce where the |
| 4 | ;; root partition is encrypted with LUKS, and a swap file. | 4 | ;; root partition is encrypted with LUKS, and a swap file. |
| 5 | 5 | ||
| 6 | (use-modules (gnu) (gnu system nss) (guix utils)) | 6 | (use-modules (gnu) (gnu system nss) (guix utils) |
| 7 | (guix packages)) | ||
| 7 | (use-service-modules desktop sddm xorg) | 8 | (use-service-modules desktop sddm xorg) |
| 8 | (use-package-modules gnome) | 9 | (use-package-modules gnome) |
| 9 | 10 | ||
| @@ -73,7 +74,10 @@ | |||
| 73 | ;; by clicking the gear. Use the "desktop" services, which | 74 | ;; by clicking the gear. Use the "desktop" services, which |
| 74 | ;; include the X11 log-in service, networking with | 75 | ;; include the X11 log-in service, networking with |
| 75 | ;; NetworkManager, and more. | 76 | ;; NetworkManager, and more. |
| 76 | (services (if (target-x86-64?) | 77 | (services (if (supported-package? gnome |
| 78 | (or (and=> (%current-target-system) | ||
| 79 | gnu-triplet->nix-system) | ||
| 80 | (%current-system))) | ||
| 77 | (append (list (service gnome-desktop-service-type) | 81 | (append (list (service gnome-desktop-service-type) |
| 78 | (service xfce-desktop-service-type) | 82 | (service xfce-desktop-service-type) |
| 79 | (set-xorg-configuration | 83 | (set-xorg-configuration |
| @@ -81,16 +85,14 @@ | |||
| 81 | (keyboard-layout keyboard-layout)))) | 85 | (keyboard-layout keyboard-layout)))) |
| 82 | %desktop-services) | 86 | %desktop-services) |
| 83 | 87 | ||
| 84 | ;; FIXME: Since GDM depends on Rust (gdm -> gnome-shell -> gjs | 88 | ;; FIXME: Since Gnome depends on Rust and Rust is currently |
| 85 | ;; -> mozjs -> rust) and Rust is currently unavailable on | 89 | ;; unavailable on some platforms, we use MATE here instead of |
| 86 | ;; non-x86_64 platforms, we use SDDM and Mate here instead of | 90 | ;; GNOME. |
| 87 | ;; GNOME and GDM. | ||
| 88 | (append (list (service mate-desktop-service-type) | 91 | (append (list (service mate-desktop-service-type) |
| 89 | (service xfce-desktop-service-type) | 92 | (service xfce-desktop-service-type) |
| 90 | (set-xorg-configuration | 93 | (set-xorg-configuration |
| 91 | (xorg-configuration | 94 | (xorg-configuration |
| 92 | (keyboard-layout keyboard-layout)) | 95 | (keyboard-layout keyboard-layout)))) |
| 93 | sddm-service-type)) | ||
| 94 | %desktop-services))) | 96 | %desktop-services))) |
| 95 | 97 | ||
| 96 | ;; Allow resolution of '.local' host names with mDNS. | 98 | ;; Allow resolution of '.local' host names with mDNS. |
