aboutsummaryrefslogtreecommitdiff
path: root/tw/home.scm
diff options
context:
space:
mode:
authorTimo Wilken2024-01-19 23:56:27 +0100
committerTimo Wilken2024-01-19 23:56:57 +0100
commitb39d3605028c34063ec57ffa81333260be71af64 (patch)
treef82a98541ea3f6c39a58e1336004cdf520f95e0d /tw/home.scm
parentfeab731c1441659dba1246affef39b4cf7da7997 (diff)
Install PIM environment on new end-user machines
Diffstat (limited to 'tw/home.scm')
-rw-r--r--tw/home.scm42
1 files changed, 42 insertions, 0 deletions
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")))))