diff --git a/nixos/email-accounts.nix b/nixos/email-accounts.nix index 39c67a03..fe942d2b 100644 --- a/nixos/email-accounts.nix +++ b/nixos/email-accounts.nix @@ -19,12 +19,10 @@ }; notmuch.enable = true; astroid.enable = true; + neomutt.enable = true; msmtp.enable = true; passwordCommand = "${pkgs.pass}/bin/pass proton-bridge"; - mbsync = { - enable = true; - create = "maildir"; - }; + offlineimap.enable = true; folders = { drafts = "Drafts"; inbox = "INBOX"; @@ -33,44 +31,27 @@ }; }; - services = { - imapnotify.enable = true; - - mbsync = { - enable = true; - frequency = "hourly"; - postExec = "${pkgs.notmuch}/bin/notmuch new"; - }; - }; - - programs.mbsync.enable = true; programs.msmtp.enable = true; - + programs.offlineimap.enable = true; programs.notmuch = { enable = true; - hooks = { - preNew = "mbsync --all"; - }; - }; - programs.astroid = { - enable = true; - pollScript = "${pkgs.notmuch}/bin/notmuch new"; - extraConfig = { - attachments = { - external_open_cmd = "${pkgs.xdg_utils}/bin/xdg-open"; - }; - }; + hooks.preNew = "${pkgs.offlineimap}/bin/offlineimap -o"; }; programs.alot = { enable = true; }; + programs.astroid = { + enable = true; + pollScript = "${pkgs.notmuch}/bin/notmuch new"; + }; + programs.neomutt = { + enable = true; + }; home.packages = with pkgs; [ hydroxide ]; - - systemd.user.services."hydroxide" = { Unit.Description = "Bridge to ProtonMail"; Install.WantedBy = [ "default.target" ];