Add sawfish service code
This should probably have been added earlier, but I seem to have missed it.
This commit is contained in:
parent
869528b295
commit
21d8c958e8
1 changed files with 49 additions and 0 deletions
49
oni/home/services/sawfish.scm
Normal file
49
oni/home/services/sawfish.scm
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
(define-module (oni home services sawfish)
|
||||||
|
#:use-module ((gnu services configuration)
|
||||||
|
#:select (define-configuration/no-serialization))
|
||||||
|
#:use-module ((gnu home services)
|
||||||
|
#:select (service-type
|
||||||
|
service-extension
|
||||||
|
home-profile-service-type))
|
||||||
|
#:use-module ((gnu packages sawfish)
|
||||||
|
#:select (sawfish))
|
||||||
|
#:use-module ((guix gexp)
|
||||||
|
#:select (mixed-text-file))
|
||||||
|
#:use-module ((guix packages)
|
||||||
|
#:select (package?))
|
||||||
|
#:use-module ((oni home services xinit)
|
||||||
|
#:select (home-xinit-service-type
|
||||||
|
home-xinit-extension))
|
||||||
|
|
||||||
|
#:export (home-sawfish-service-type
|
||||||
|
home-sawfish-configuration))
|
||||||
|
|
||||||
|
(define-configuration/no-serialization home-sawfish-configuration
|
||||||
|
(package
|
||||||
|
(package sawfish)
|
||||||
|
"Package use for setting sawfish"))
|
||||||
|
|
||||||
|
(define (add-sawfish-packages config)
|
||||||
|
(list (home-sawfish-configuration-package config)))
|
||||||
|
|
||||||
|
(define (add-sawfish-executable config)
|
||||||
|
(home-xinit-extension
|
||||||
|
(wm
|
||||||
|
(list
|
||||||
|
(mixed-text-file
|
||||||
|
"xinitrc"
|
||||||
|
"exec " (home-sawfish-configuration-package config) "/bin/sawfish")))))
|
||||||
|
|
||||||
|
(define home-sawfish-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-sawfish)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension
|
||||||
|
home-profile-service-type
|
||||||
|
add-sawfish-packages)
|
||||||
|
(service-extension
|
||||||
|
home-xinit-service-type
|
||||||
|
add-sawfish-executable)))
|
||||||
|
(compose identity)
|
||||||
|
(default-value (home-sawfish-configuration))
|
||||||
|
(description "Install and configure sawfish.")))
|
Loading…
Reference in a new issue