summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.org15
-rw-r--r--nonguix/transformations.scm24
2 files changed, 32 insertions, 7 deletions
diff --git a/README.org b/README.org
index d005d79..576b535 100644
--- a/README.org
+++ b/README.org
@@ -250,8 +250,10 @@ Procedure =nonguix-transformation-nvidia= is defined in the
KERNEL-MODE-SETTING? (default: #t) is required for Wayland and rootless Xorg
support.
- CONFIGURE-XORG? (default: #f) is required for Xorg display managers. Currently
- this argument configures the one used by '%desktop-services', GDM or SDDM.
+ CONFIGURE-XORG? (default: #f) is required for Xorg display managers. When
+ setting to #t, it configures the one specified by '%desktop-services'. If you
+ set up the display manager on your own, use its service type instead,
+ 'sddm-service-type', for example.
Use 'replace-mesa', for application setup out of the operating system
declaration.
@@ -283,11 +285,20 @@ variable =%my-os=:
- Xorg environmnet: =#:configure-xorg?=:
+ Set to =#t= when you're using =%desktop-services=.
+
#+begin_src scheme
((nonguix-transformation-nvidia #:configure-xorg? #t)
%my-os)
#+end_src
+ Specify service type of your display manager otherwine.
+
+ #+begin_src scheme
+ ((nonguix-transformation-nvidia #:configure-xorg? sddm-service-type)
+ %my-os)
+ #+end_src
+
Full example below, using =compose= so that other system transformations can be
mixed in:
diff --git a/nonguix/transformations.scm b/nonguix/transformations.scm
index 043b6d7..e31bbce 100644
--- a/nonguix/transformations.scm
+++ b/nonguix/transformations.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
(define-module (nonguix transformations)
+ #:use-module (ice-9 match)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (guix channels)
@@ -116,8 +117,10 @@ with supported graphics cards.
KERNEL-MODE-SETTING? (default: #t) is required for Wayland and rootless Xorg
support.
-CONFIGURE-XORG? (default: #f) is required for Xorg display managers. Currently
-this argument configures the one used by '%desktop-services', GDM or SDDM.
+CONFIGURE-XORG? (default: #f) is required for Xorg display managers. When
+setting to #t, it configures the one specified by '%desktop-services'. If you
+set up the display manager on your own, use its service type instead,
+'sddm-service-type', for example.
Use 'replace-mesa', for application setup out of the operating system
declaration."
@@ -150,6 +153,19 @@ declaration."
nvidia-module-590))
(modprobe nvidia-modprobe-590))))))
+ (define %xorg-extension
+ (and=> configure-xorg?
+ (match-lambda
+ (#t
+ (set-xorg-configuration
+ (xorg-configuration
+ (modules (list driver)))))
+ (display-manager
+ (set-xorg-configuration
+ (xorg-configuration
+ (modules (list driver)))
+ display-manager)))))
+
(lambda (os)
(operating-system
(inherit os)
@@ -176,9 +192,7 @@ declaration."
(G_ "no NVIDIA service configuration available for '~a'~%")
(package-name driver)))
,@(if configure-xorg?
- (list (set-xorg-configuration
- (xorg-configuration
- (modules (list driver)))))
+ (list %xorg-extension)
'())
,@(operating-system-user-services os))
#:driver driver)))))