From b39d3605028c34063ec57ffa81333260be71af64 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Fri, 19 Jan 2024 23:56:27 +0100 Subject: Install PIM environment on new end-user machines --- tw/home.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'tw/home.scm') diff --git a/tw/home.scm b/tw/home.scm index 6f4564a3..4c3ddef8 100644 --- a/tw/home.scm +++ b/tw/home.scm @@ -17,6 +17,7 @@ #:use-module (tw packages catppuccin) #:use-module (tw packages ci) #:use-module (tw packages games) + #:use-module (tw packages mail) #:use-module (tw packages xorg) #:use-module (tw system) #:use-module (tw theme)) @@ -583,3 +584,44 @@ show_border=1 (".local/bin/volume" ,(local-file "home/files/volume" #:recursive? #t)) (".local/share/applications/emacsclient.desktop" ,(local-file "home/files/emacsclient.desktop")))))) + +(define %pim-packages + (list newsboat vdirsyncer khal khard aerc lynx mutt_oauth2.py)) ; lynx for HTML mail + +(define %pim-services + (list + (simple-service 'pim-config home-xdg-configuration-files-service-type + `(("khal/config" ,(local-file "files/khal.conf")) + ("khard/khard.conf" ,(local-file "files/khard.conf")) + ("aerc/accounts.conf" ,(local-file "files/aerc/accounts.conf")) + ("aerc/aerc.conf" ,(local-file "files/aerc/aerc.conf")) + ("aerc/binds.conf" ,(local-file "files/aerc/binds.conf")) + ("aerc/filters" ,(local-file "files/aerc/filters" #:recursive? #t)) + ("aerc/stylesets" ,(local-file "files/aerc/stylesets" #:recursive? #t)) + ("newsboat/config" ,(local-file "files/newsboat.conf")) + ("newsboat/config.catppuccin" ,catppuccin-newsboat) + ("vdirsyncer/config" ,(local-file "files/vdirsyncer.conf")))) + + ;; To avoid popping up a password prompt every time these run, gpg-agent + ;; needs a long-enough default-cache-ttl. + (simple-service 'pim-cronjobs home-mcron-service-type + (list #~(job "15 */4 * * *" ; every four hours at HH:15 + (string-append #$(file-append vdirsyncer "/bin/vdirsyncer") " metasync")) + #~(job "0,30 * * * *" ; every half hour + (string-append #$(file-append vdirsyncer "/bin/vdirsyncer") " sync")))) + + (service home-msmtp-service-type + (home-msmtp-configuration + (defaults (msmtp-configuration + (tls? #t) + (tls-starttls? #f) ; use "real" TLS instead + (log-file "-"))) ; log to stdout + (accounts (list + (msmtp-account + (name "mythic") + (configuration + (msmtp-configuration + (host "smtp-auth.mythic-beasts.com") + (user "timo@twilken.net") + (password-eval "pass www/mythic-beasts/email/timo | head -1")))))) + (default-account "mythic"))))) -- cgit v1.2.3