diff --git a/gnu/system/install.scm b/gnu/sysdiff --git a/gnu/system/install.scm b/gnu/system/install.scm index f6f1923121..2a1f401536 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -40,6 +40,7 @@ (define-module (gnu system install) #:use-module (gnu system locale) #:use-module (gnu services avahi) #:use-module (gnu services dbus) + #:use-module (gnu services linux) #:use-module (gnu services networking) #:use-module (gnu services shepherd) #:use-module (gnu services ssh) @@ -283,29 +284,22 @@ (define %nscd-minimal-caches ;; These define a service to load the uvesafb kernel module with the ;; appropriate options. The GUI installer needs it when the machine does not ;; support Kernel Mode Setting. Otherwise kmscon is missing /dev/fb0. -(define (uvesafb-shepherd-service _) - (list (shepherd-service - (documentation "Load the uvesafb kernel module if needed.") - (provision '(maybe-uvesafb)) - (requirement '(file-systems)) - (start #~(lambda () - (or (file-exists? "/dev/fb0") - (invoke #+(file-append kmod "/bin/modprobe") - "uvesafb" - (string-append "v86d=" #$v86d "/sbin/v86d") - "mode_option=1024x768")))) - (respawn? #f) - (one-shot? #t)))) - -(define uvesafb-service-type - (service-type - (name 'uvesafb) - (extensions - (list (service-extension shepherd-root-service-type - uvesafb-shepherd-service))) - (description - "Load the @code{uvesafb} kernel module with the right options.") - (default-value #t))) +(define uvesafb-config + (computed-file "uvesafb.conf" + #~(with-output-to-file #$output + (lambda () + (display + (string-append "options uvesafb" + " " "v86d=" #$v86d "/sbin/v86d" + " " "mode_option=1024x768")))))) + +(define uvesafb-services + (list (service kernel-module-loader-service-type + '("uvesafb")) + (simple-service 'uvesafb-config etc-service-type + (list `("modprobe.d/uvesafb.conf" + ,uvesafb-config))))) + (define* (%installation-services #:key (system (or (and=> (%current-target-system) @@ -450,8 +444,7 @@ (define bare-bones-os ;; installer. Some may also need a kernel parameter like nomodeset ;; or vga=793, but we leave that for the user to specify in GRUB. `(,@(if (supported-package? v86d system) - (list (service uvesafb-service-type)) - '()))))) + uvesafb-services))))) (define %issue ;; Greeting.