dotfiles/guix-config/home/services/secretsd.scm

40 lines
1.5 KiB
Scheme

(define-module (guix-config home services secretsd)
#:use-module (gnu home services)
#:use-module (gnu home services shepherd)
#:use-module (gnu packages bash)
#:use-module (gnu packages base)
#:use-module (gnu packages glib)
#:use-module (gnu packages password-utils)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
#:use-module (guix gexp)
#:use-module (guix records)
#:export (home-secretsd-service-type))
(define (home-secretsd-shepherd-service config)
(list
(shepherd-service
(documentation "Run secretsd - secret service.")
(provision '(secretsd))
(start #~(lambda _
(mkdir-p (string-append (getenv "HOME")
"/.local/share/nullroute.lt/secretsd"))
(make-forkexec-constructor
(list
#$(file-append secretsd "/bin/secretsd") "-v")
#:log-file (string-append (getenv "HOME")
"/.local/var/log/secretsd.log"))))
(stop #~(make-kill-destructor)))))
(define home-secretsd-service-type
(service-type
(name 'home-secretsd)
(extensions
(list (service-extension home-shepherd-service-type
home-secretsd-shepherd-service)
(service-extension home-profile-service-type
(lambda (config)
(list dbus
secretsd)))))
(description "Install secretsd, a secret service. This service runs secretsd on start")
(default-value '())))