Compare commits

...

2 commits

Author SHA1 Message Date
21d8c958e8 Add sawfish service code
This should probably have been added earlier, but I seem to have missed it.
2024-11-18 21:41:47 -08:00
869528b295 Add cbatticon service 2024-11-18 21:41:36 -08:00
3 changed files with 108 additions and 1 deletions

View file

@ -15,6 +15,8 @@
#:use-module (gnu services) #:use-module (gnu services)
#:use-module (guix gexp) #:use-module (guix gexp)
#:use-module (oni home config common) #:use-module (oni home config common)
#:use-module ((oni home services admin)
#:select (home-cbatticon-service-type))
#:use-module (oni home services cmst) #:use-module (oni home services cmst)
#:use-module (oni home services dunst) #:use-module (oni home services dunst)
#:use-module ((oni home services emacs) #:use-module ((oni home services emacs)
@ -298,4 +300,5 @@
(service home-emacs-golden-ratio-service-type) (service home-emacs-golden-ratio-service-type)
(service home-emacs-pinentry-service-type) (service home-emacs-pinentry-service-type)
(service home-xss-lock-service-type)))) (service home-xss-lock-service-type)
(service home-cbatticon-service-type))))

View file

@ -0,0 +1,55 @@
(define-module (oni home services admin)
#:use-module ((gnu home services)
#:select (service-type
service-extension
home-profile-service-type))
#:use-module ((gnu home services shepherd)
#:select (home-shepherd-service-type
shepherd-service))
#:use-module ((gnu packages admin)
#:select (cbatticon))
#:use-module ((gnu services configuration)
#:select (serialize-package
define-configuration))
#:use-module ((guix gexp)
#:select (gexp
file-append))
#:use-module ((guix packages)
#:select (package?))
#:export (home-cbatticon-configuration
home-cbatticon-service-type))
(define-configuration home-cbatticon-configuration
(package
(package cbatticon)
"Package to use for setting cbatticon"))
(define (add-cbatticon-packages config)
(list (home-cbatticon-configuration-package config)))
(define (home-cbatticon-shepherd-service config)
(list
(shepherd-service
(documentation "Start cbatticon")
(provision '(cbatticon))
(auto-start? #t)
(start
#~(make-forkexec-constructor
(list #$(file-append (home-cbatticon-configuration-package config) "/bin/cbatticon"))
#:log-file (format #f "~a/.local/var/log/cbatticon.log" (getenv "HOME"))))
(stop #~(make-kill-destructor)))))
(define home-cbatticon-service-type
(service-type
(name 'home-cbatticon)
(extensions
(list (service-extension
home-profile-service-type
add-cbatticon-packages)
(service-extension
home-shepherd-service-type
home-cbatticon-shepherd-service)))
(compose identity)
(default-value (home-cbatticon-configuration))
(description "Install and configure cbatticon.")))

View 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.")))