Subject: [bug#64798] [PATCH 206/209] services: sddm: set some envvar to constructor.

From: Zheng Junjie <[email-masked]>
Date: Sun, 23 Jul 2023 16:47:06 +0800

* gnu/services/sddm.scm(sddm-service-type): set some envvar to make
breeze theme work.
---
 gnu/services/sddm.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/services/sddm.scm b/gnu/services/sddm.scm
index c9a7ba96f4..69c737829b 100644
--- a/gnu/services/sddm.scm
+++ b/gnu/services/sddm.scm
@@ -171,7 +171,16 @@ (define (sddm-shepherd-service config)
          (documentation "SDDM display manager.")
          (requirement '(user-processes elogind pam))
          (provision '(xorg-server display-manager))
-         (start #~(make-forkexec-constructor #$sddm-command))
+         (start #~(make-forkexec-constructor
+                   #$sddm-command
+                   ;; some theme need icon,qml,data so add path to env.
+                   #:environment-variables
+                   (cons*
+                    "XDG_DATA_DIRS=/run/current-system/profile/share"
+                    "XDG_CONFIG_DIRS=/run/current-system/profile/etc/xdg"
+                    "QT_PLUGIN_PATH=/run/current-system/profile/lib/qt5/plugins"
+                    "QML2_IMPORT_PATH=/run/current-system/profile/lib/qt5/qml"
+                    (default-environment-variables))))
          (stop #~(make-kill-destructor)))))
 
 (define (sddm-etc-service config)
-- 
2.41.0