This commit is contained in:
nathan mccarty 2022-07-06 01:15:21 -04:00
parent 148c39fbd2
commit cc139355c3
Signed by: thatonelutenist
GPG Key ID: D70DA3DD4D1E9F96
5 changed files with 25 additions and 3 deletions

View File

@ -377,4 +377,7 @@ work if it thinks it needs to."
(setq +mu4e-backend nil) (setq +mu4e-backend nil)
(after! mu4e (after! mu4e
(setq mu4e-get-mail-command "true" (setq mu4e-get-mail-command "true"
mu4e-update-interval 300)) mu4e-update-interval nil))
(after! mu4e
(setq mu4e-change-filenames-when-moving t))

View File

@ -594,5 +594,10 @@ Tell it not to update the mail itself, we have a systemd unit for that
(setq +mu4e-backend nil) (setq +mu4e-backend nil)
(after! mu4e (after! mu4e
(setq mu4e-get-mail-command "true" (setq mu4e-get-mail-command "true"
mu4e-update-interval 300)) mu4e-update-interval nil))
#+end_src
We need to tell mu4e to rename files when they are moved, or else mbsync will break, see [[https://github.com/djcb/mu/issues/613#issuecomment-166714305][issue]] and [[http://tiborsimko.org/mbsync-duplicate-uid.html][blog post]]
#+begin_src emacs-lisp
(after! mu4e
(setq mu4e-change-filenames-when-moving t))
#+end_src #+end_src

View File

@ -17,6 +17,15 @@
libnotify libnotify
# For flash cards # For flash cards
anki anki
# Desktop file for org-protocol
(makeDesktopItem {
name = "org-protocol";
exec = "emacsclient %u";
comment = "Org protocol";
desktopName = "org-protocol";
type = "Application";
mimeTypes = [ "x-scheme-handler/org-protocol" ];
})
]; ];
# Setup doom emacs # Setup doom emacs
programs.doom-emacs = { programs.doom-emacs = {

View File

@ -60,6 +60,7 @@ with lib; {
mbsync = { mbsync = {
enable = true; enable = true;
create = "maildir"; create = "maildir";
remove = "both";
}; };
mu.enable = true; mu.enable = true;
msmtp = { msmtp = {
@ -81,7 +82,7 @@ with lib; {
postExec = postExec =
if config.nathan.programs.emacs.service if config.nathan.programs.emacs.service
then then
''${config.nathan.programs.emacs.package}/bin/emacsclient --eval "(mu4e-update-mail-and-index t)"'' "${../../scripts/update-mu4e.sh}"
else else
"${pkgs.mu}/bin/mu index"; "${pkgs.mu}/bin/mu index";
}; };

View File

@ -1 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Turn on the guard rails
set -exou pipefail
# Tell emacs to update mu4e
emacsclient --eval "(mu4e-update-index)"