M home/home-configuration.scm => home/home-configuration.scm +2 -0
@@ 27,6 27,7 @@
(ruther home dwl wm)
(ruther home dwl scripts)
(ruther home packages themes)
+ (ruther home services hydroxide)
(ruther home services gtk)
(ruther home services xdg-desktop-portals)
(ruther home services wayland)
@@ 265,6 266,7 @@ exec ~a ~a"
(service home-emacs-service-type
(home-emacs-configuration
(emacs emacs-pgtk)))
+ (service hydroxide-service-type)
(service home-blueman-applet-service-type)
(service home-network-manager-applet-service-type)
(service home-gammastep-service-type)
A home/modules/ruther/home/services/hydroxide.scm => home/modules/ruther/home/services/hydroxide.scm +32 -0
@@ 0,0 1,32 @@
+(define-module (ruther home services hydroxide)
+ #:use-module (guix gexp)
+ #:use-module (gnu packages mail)
+ #:use-module (gnu home services)
+ #:use-module (gnu home services shepherd)
+ #:use-module (gnu services shepherd)
+ #:use-module (gnu services configuration)
+ #:use-module (gnu services))
+
+(define-configuration home-hydroxide-configuration
+ (hydroxide (file-like hydroxide) "Hydroxide package to use."))
+
+(define (home-hydroxide-shepherd-services config)
+ (list
+ (shepherd-service
+ (documentation "Run hydroxide serve")
+ (provision '(hydroxide))
+ (start #~(make-forkexec-constructor
+ (list #$(file-append (home-hydroxide-configuration-hydroxide config)
+ "/bin/hydroxide")
+ "serve")))
+ (stop #~(make-kill-destructor)))))
+
+(define-public hydroxide-service-type
+ (service-type
+ (name 'home-hydroxide)
+ (description "Run hydroxide bridge for Protonmail.")
+ (default-value (home-hydroxide-configuration))
+ (extensions
+ (list
+ (service-extension home-shepherd-service-type
+ home-hydroxide-shepherd-services)))))