Add flameshot service

This commit is contained in:
Tom Willemse 2022-10-06 23:21:43 -07:00
parent a85ad3fddd
commit 62ab490e6b
2 changed files with 49 additions and 1 deletions

View file

@ -20,6 +20,7 @@
#:use-module (oni home services dunst) #:use-module (oni home services dunst)
#:use-module (oni home services emacs) #:use-module (oni home services emacs)
#:use-module (oni home services environment) #:use-module (oni home services environment)
#:use-module (oni home services flameshot)
#:use-module (oni home services kdeconnect) #:use-module (oni home services kdeconnect)
#:use-module (oni home services polybar) #:use-module (oni home services polybar)
#:use-module (oni home services rofi) #:use-module (oni home services rofi)
@ -101,4 +102,6 @@
(service home-emacs-service-type (service home-emacs-service-type
(home-emacs-configuration (home-emacs-configuration
(package emacs-next)))))) (package emacs-next)))
(service home-flameshot-service-type))))

View file

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