~ruther/guix-config

ee998cf970fc5cfdef2344207db87553d7055bc7 — Rutherther 6 months ago f715765
feat: hydroxide service
2 files changed, 34 insertions(+), 0 deletions(-)

M home/home-configuration.scm
A home/modules/ruther/home/services/hydroxide.scm
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)))))

Do not follow this link