services: set-xorg-configuration: Use target-x86-64?.

* gnu/services/xorg.scm (set-xorg-configuration)[login-manager-service-type]:
Use target-x86-64? from (guix utils) to decide if the system is an x86_64
system instead of comparing the strings ourselves.
This commit is contained in:
Chris Marusich 2022-01-08 15:18:24 -08:00
parent 6a2050b1e1
commit dc2b90109b
No known key found for this signature in database
GPG Key ID: DD409A15D822469D

View File

@ -59,6 +59,7 @@
#:use-module (guix derivations)
#:use-module (guix records)
#:use-module (guix deprecation)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-26)
@ -1048,11 +1049,9 @@ you to log in in a graphical session, whether or not you use GNOME."))))
(define* (set-xorg-configuration config
#:optional
(login-manager-service-type
(let ((system (or (%current-target-system)
(%current-system))))
(if (string-prefix? "x86_64" system)
(if (target-x86-64?)
gdm-service-type
sddm-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