From 432cb4780a3e01d3beeaa59a023f5d784f257af1 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 9 Dec 2024 23:07:44 -0800 Subject: [PATCH] Add start of mbsync service --- oni/home/config/data.scm | 6 +++++- oni/home/services/mail.scm | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 oni/home/services/mail.scm diff --git a/oni/home/config/data.scm b/oni/home/config/data.scm index 0c7a4c0..d17eeef 100644 --- a/oni/home/config/data.scm +++ b/oni/home/config/data.scm @@ -38,6 +38,8 @@ #:use-module (oni home services environment) ;; #:use-module (oni home services herbstluftwm) #:use-module (oni home services kdeconnect) + #:use-module ((oni home services mail) + #:select (home-mbsync-service-type)) #:use-module ((oni home services picom) #:select (home-picom-service-type home-picom-configuration)) @@ -314,4 +316,6 @@ (service home-emacs-org-caldav-service-type) (service home-xss-lock-service-type) - (service home-cbatticon-service-type)))) + (service home-cbatticon-service-type) + + (service home-mbsync-service-type)))) diff --git a/oni/home/services/mail.scm b/oni/home/services/mail.scm new file mode 100644 index 0000000..10915bb --- /dev/null +++ b/oni/home/services/mail.scm @@ -0,0 +1,34 @@ +(define-module (oni home services mail) + #:use-module ((gnu home services) + #:select (service-type + service-extension + home-profile-service-type)) + #:use-module ((gnu packages mail) + #:select (isync)) + #:use-module ((gnu services configuration) + #:select (serialize-package + define-configuration)) + #:use-module ((guix packages) + #:select (package?)) + + #:export (home-mbsync-service-type + home-mbsync-configuration)) + +(define-configuration home-mbsync-configuration + (package + (package isync) + "Package to use for setting up mbsync")) + +(define (add-mbsync-packages config) + (list (home-mbsync-configuration-package config))) + +(define home-mbsync-service-type + (service-type + (name 'home-mbsync) + (extensions + (list (service-extension + home-profile-service-type + add-mbsync-packages))) + (compose 'identity) + (default-value (home-mbsync-configuration)) + (description "Install and configure mbsync.")))