diff options
| author | Vineet Kumar <git@vineetk.net> | 2026-03-20 20:59:02 -0400 |
|---|---|---|
| committer | Vineet Kumar <git@vineetk.net> | 2026-03-21 16:25:37 -0400 |
| commit | e74b138d41aed08c2c446525f4ce8f0e7b414ad1 (patch) | |
| tree | f5dc384ac65021ba01f77be79f560ba002d14c02 | |
| parent | c98798b262d252e5852040eb7ad213f27f6b3410 (diff) | |
demiurge, home: switch back to xorg+exwm with custom xorg-server package for drivers
| -rw-r--r-- | epistemia/packages/xorg.scm | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/epistemia/packages/xorg.scm b/epistemia/packages/xorg.scm new file mode 100644 index 0000000..49a5926 --- /dev/null +++ b/epistemia/packages/xorg.scm | |||
| @@ -0,0 +1,59 @@ | |||
| 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," | ||
| 28 | #$(this-package-input "xf86-video-amdgpu") "/lib/xorg/modules\"\n" | ||
| 29 | "EndSection\n") | ||
| 30 | port))) | ||
| 31 | (call-with-output-file | ||
| 32 | (string-append #$output "/share/X11/xorg.conf.d/10-input.conf") | ||
| 33 | (lambda (port) | ||
| 34 | (display | ||
| 35 | (string-append | ||
| 36 | "Section \"InputClass\"\n" | ||
| 37 | " Identifier \"keyboards\"\n" | ||
| 38 | " MatchIsKeyboard \"on\"\n" | ||
| 39 | " Driver \"libinput\"\n" | ||
| 40 | "EndSection\n" | ||
| 41 | "\n" | ||
| 42 | "Section \"InputClass\"\n" | ||
| 43 | " Identifier \"mice\"\n" | ||
| 44 | " MatchIsPointer \"on\"\n" | ||
| 45 | " Driver \"libinput\"\n" | ||
| 46 | " Option \"AccelProfile\" \"flat\"\n" | ||
| 47 | " Option \"AccelSpeed\" \"0\"\n" | ||
| 48 | "EndSection\n" | ||
| 49 | "\n" | ||
| 50 | "Section \"InputClass\"\n" | ||
| 51 | " Identifier \"wacom\"\n" | ||
| 52 | " MatchDriver \"wacom\"\n" | ||
| 53 | " Driver \"wacom\"\n" | ||
| 54 | "EndSection\n") | ||
| 55 | port))))))))) | ||
| 56 | (inputs (modify-inputs (package-inputs xorg-server) | ||
| 57 | (append xf86-input-libinput | ||
| 58 | xf86-input-wacom | ||
| 59 | xf86-video-amdgpu))))) | ||
