From bbe11687c0c3b93d607bdce55fc4486c739b6bcd Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Sat, 20 Mar 2021 15:38:11 +0100 Subject: [PATCH] Enable mu indexer for mail --- configurations/mail.nix | 15 ++++++++++++--- flake.lock | 6 +++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/configurations/mail.nix b/configurations/mail.nix index a031ddea..d5294955 100644 --- a/configurations/mail.nix +++ b/configurations/mail.nix @@ -28,7 +28,7 @@ let enable = true; boxes = [ "INBOX" ]; onNotify = "${pkgs.isync}/bin/mbsync ${name}:INBOX"; - onNotifyPost = "${notifyScript name}"; + onNotifyPost = "${pkgs.mu}/bin/mu index && ${notifyScript name}"; }; mbsync = { enable = true; @@ -39,6 +39,7 @@ let extraConfig.account.AuthMechs = "LOGIN"; }; msmtp.enable = true; + mu.enable = true; neomutt = { enable = true; sendMailCommand = "msmtpq --read-envelope-from --read-recipients --account ${name}"; @@ -80,6 +81,7 @@ in { chvp.zfs.homeLinks = [ { path = "mail"; type = "data"; } + { path = ".cache/mu"; type = "cache"; } { path = ".local/share/contacts"; type = "cache"; } { path = ".local/share/calendars"; type = "cache"; } { path = ".local/share/vdirsyncer"; type = "cache"; } @@ -282,6 +284,7 @@ in programs = { mbsync.enable = true; msmtp.enable = true; + mu.enable = true; neomutt = { enable = true; sidebar = { @@ -331,7 +334,10 @@ in After = "network-online.target"; Wants = "network-online.target"; }; - Service = { ExecStart = "${pkgs.isync}/bin/mbsync -a"; }; + Service = { + Type = "oneshot"; + ExecStart = [ "${pkgs.isync}/bin/mbsync -a" "${pkgs.mu}/bin/mu index" ]; + }; }; vdirsyncer = { Unit = { @@ -339,7 +345,10 @@ in After = "network-online.target"; Wants = "network-online.target"; }; - Service = { ExecStart = "${pkgs.vdirsyncer}/bin/vdirsyncer sync"; }; + Service = { + Type = "oneshot"; + ExecStart = "${pkgs.vdirsyncer}/bin/vdirsyncer sync"; + }; }; }; timers = { diff --git a/flake.lock b/flake.lock index ff03b6e3..e7a91286 100644 --- a/flake.lock +++ b/flake.lock @@ -54,11 +54,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1616244939, - "narHash": "sha256-fNadCs2M6/UP41OWxYJ8KxihBoOlqkvyAQ+NG5VbEBA=", + "lastModified": 1616250371, + "narHash": "sha256-bG3/Dt3f/x8qUZ6djnfUVG8erVzwA9I4pxrtzmCizoI=", "owner": "chvp", "repo": "nixpkgs", - "rev": "a1a03554af1186669a645609e25a9476f267280b", + "rev": "e132ddfecfeba08f3b09b72064ded55b9fceb45a", "type": "github" }, "original": {