Files
dotfiles/home/programs/neomutt.nix
servius 34160d0de4
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m27s
feat: Updated notifications
2026-02-22 15:16:10 +05:30

41 lines
1003 B
Nix

{pkgs, ...}: let
theme = builtins.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/neomutt/refs/heads/main/neomuttrc";
sha256 = "sha256:1q086p5maqwxa4gh6z8g7h3nfavdmkbql025ibdhglpz46hsq0hs";
};
in {
programs.neomutt = {
enable = true;
vimKeys = true;
editor = "nvim";
sidebar = {
enable = true;
};
extraConfig = ''
source ${theme}
'';
};
programs.notmuch = {
enable = true;
};
accounts.email.accounts.fastmail.neomutt = {
enable = true;
};
accounts.email.accounts.fastmail.notmuch = {
enable = true;
neomutt.enable = true;
};
services.imapnotify = {
enable = true;
path = [pkgs.coreutils pkgs.isync pkgs.libnotify];
};
accounts.email.accounts.fastmail.imapnotify = {
enable = true;
boxes = ["Inbox"];
onNotify = "${pkgs.writeShellScript "mbsync-notify" ''
${pkgs.isync}/bin/mbsync $1
${pkgs.libnotify}/bin/notify-send "New Mail" "New email in $1"
''} %s";
};
}