Commit 24eb9e32a55b
home/common/desktop/mails.nix
@@ -1,4 +1,9 @@
-{ pkgs, hostname, ... }:
+{
+ pkgs,
+ config,
+ hostname,
+ ...
+}:
{
accounts.email = {
maildirBasePath = "desktop/mails";
@@ -90,5 +95,10 @@
programs.mbsync.enable = true;
programs.msmtp.enable = true;
- programs.mu.enable = true;
+ programs.mu = {
+ enable = true;
+ # Use XDG_DATA_HOME instead of XDG_CACHE_HOME to persist the mu database
+ # across reboots and prevent re-indexing
+ home = "${config.xdg.dataHome}/mu";
+ };
}
tools/emacs/init.el
@@ -1599,7 +1599,8 @@ Add this function to the `after-save-hook'."
(use-package mu4e
:commands (mu4e)
:custom
- (mu4e-mu-home "/home/vincent/.local/cache/mu")
+ (mu4e-mu-home (expand-file-name "mu" (or (getenv "XDG_DATA_HOME")
+ (expand-file-name ".local/share" (getenv "HOME")))))
(mu4e-context-policy 'pick-first)
(mu4e-change-filenames-when-moving t)
(mu4e-attachment-dir "~/desktop/downloads")