dotfiles/oni/home/services/xsession.scm

48 lines
1.4 KiB
Scheme
Raw Normal View History

2022-04-05 10:30:08 +02:00
(define-module (oni home services xsession)
#:use-module (gnu services configuration)
#:use-module (gnu home services)
#:use-module (gnu home services utils)
#:use-module (guix packages)
#:use-module (guix gexp)
#:use-module (oni gexp)
#:use-module (srfi srfi-1)
2022-04-05 10:30:08 +02:00
#:export (home-xsession-service-type
home-xsession-configuration
home-xsession-extension))
2022-04-05 10:30:08 +02:00
(define-configuration home-xsession-configuration
2022-04-05 10:30:08 +02:00
(configuration
(text-config '())
"Configuration"))
(define-configuration/no-serialization home-xsession-extension
(wm
(text-config '())
"String"))
2022-04-05 10:30:08 +02:00
(define (xsession-home-files config)
`((".xsession"
,(mixed-executable-file
2022-04-05 10:30:08 +02:00
"xsession"
(serialize-text-config 'configuration (home-xsession-configuration-configuration config))))))
(define (home-xsession-extensions original-config extension-configs)
(home-xsession-configuration
(inherit original-config)
(configuration
(append (home-xsession-configuration-configuration original-config)
(home-xsession-extension-wm (last extension-configs))))))
2022-04-05 10:30:08 +02:00
(define home-xsession-service-type
(service-type
(name 'home-xsession)
(extensions
(list (service-extension
home-files-service-type
xsession-home-files)))
(compose identity)
(extend home-xsession-extensions)
2022-04-05 10:30:08 +02:00
(default-value (home-xsession-configuration))
(description "Configure xsession.")))