xorg.scm (2688B)
1 (define-module (epistemia packages xorg) 2 #:use-module (guix gexp) 3 #:use-module (guix packages) 4 #:use-module (guix utils) 5 #:use-module (gnu packages xdisorg) 6 #:use-module (gnu packages xorg)) 7 8 (define-public xorg-server-with-drivers 9 (package 10 (inherit xorg-server) 11 (name "xorg-server-with-drivers") 12 (arguments 13 (substitute-keyword-arguments (package-arguments xorg-server) 14 ((#:phases phases) 15 #~(modify-phases #$phases 16 (add-after 'install 'install-modules-conf 17 (lambda _ 18 ;; Add Xorg module paths so drivers in inputs are found. 19 (call-with-output-file 20 (string-append #$output "/share/X11/xorg.conf.d/00-modules.conf") 21 (lambda (port) 22 (display 23 (string-append 24 "Section \"Files\"\nModulePath \"" 25 #$output "/lib/xorg/modules," 26 #$(this-package-input "xf86-input-libinput") "/lib/xorg/modules," 27 #$(this-package-input "xf86-input-wacom") "/lib/xorg/modules\"\n" 28 "EndSection\n") 29 port))) 30 (call-with-output-file 31 (string-append #$output "/share/X11/xorg.conf.d/10-input.conf") 32 (lambda (port) 33 (display 34 (string-append 35 "Section \"InputClass\"\n" 36 " Identifier \"keyboards\"\n" 37 " MatchIsKeyboard \"on\"\n" 38 " Driver \"libinput\"\n" 39 "EndSection\n" 40 "\n" 41 "Section \"InputClass\"\n" 42 " Identifier \"mice\"\n" 43 " MatchIsPointer \"on\"\n" 44 " Driver \"libinput\"\n" 45 " Option \"AccelProfile\" \"flat\"\n" 46 " Option \"AccelSpeed\" \"0\"\n" 47 "EndSection\n" 48 "\n" 49 "Section \"InputClass\"\n" 50 " Identifier \"touchpads\"\n" 51 " MatchIsTouchpad \"on\"\n" 52 " Driver \"libinput\"\n" 53 " Option \"AccelProfile\" \"flat\"\n" 54 " Option \"AccelSpeed\" \"0\"\n" 55 " Option \"Tapping\" \"on\"\n" 56 " Option \"TappingButtonMap\" \"lrm\"\n" 57 "EndSection\n" 58 "\n" 59 "Section \"InputClass\"\n" 60 " Identifier \"wacom\"\n" 61 " MatchProduct \"Wacom\"\n" 62 " Driver \"wacom\"\n" 63 "EndSection\n") 64 port))) 65 (call-with-output-file 66 (string-append #$output "/share/X11/xorg.conf.d/10-monitor-maxclock.conf") 67 ;; fixes xorg edid validation for 5120x1440@240Hz on my MSI MPG491CX OLED 68 (lambda (port) 69 (display 70 (string-append 71 "Section \"Monitor\"\n" 72 " Identifier \"DP-4\"\n" 73 " Option \"MaxClock\" \"2200 MHz\"\n" 74 "EndSection\n") 75 port))))))))) 76 (inputs (modify-inputs (package-inputs xorg-server) 77 (append xf86-input-libinput 78 xf86-input-wacom)))))