feat: Updated notifications
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m27s

This commit is contained in:
2026-02-20 16:56:58 +05:30
parent 02b8a16f41
commit 34160d0de4
2 changed files with 21 additions and 4 deletions

View File

@@ -31,9 +31,6 @@
port = 465;
tls.enable = true;
};
imapnotify = {
enable = true;
};
passwordCommand = ["cat" "${config.sops.secrets."accounts/mail/fastmail".path}"];
mbsync = {
enable = true;

View File

@@ -1,4 +1,9 @@
{pkgs, ...}: {
{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;
@@ -6,6 +11,9 @@
sidebar = {
enable = true;
};
extraConfig = ''
source ${theme}
'';
};
programs.notmuch = {
enable = true;
@@ -17,4 +25,16 @@
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";
};
}