nixos-config/system/home-manager/email.nix

87 lines
2.2 KiB
Nix
Raw Normal View History

{ config, ... }:
{
imports = [ ../../secrets/email.nix ];
accounts.email.maildirBasePath = "$HOME/.maildir";
programs.neomutt = {
enable = true;
sort = "date";
settings = {
imap_idle = "yes";
imap_check_subscribed = "yes";
mail_check = "90";
timeout = "15";
header_cache = "${config.xdg.cacheHome}/neomutt/headers";
message_cachedir = "${config.xdg.cacheHome}/bodies";
certificate_file = "${config.xdg.cacheHome}/certificates";
edit_headers = "yes";
charset = "UTF-8";
realname = "'Christoph Heiss'";
use_domain = "no";
use_from = "yes";
use_threads = "threads";
};
binds = [
{
map = [ "generic" ];
key = "h";
action = "next-entry";
}
{
map = [ "generic" ];
key = "t";
action = "previous-entry";
}
{
map = [ "index" "pager" ];
key = "h";
action = "next-undeleted";
}
{
map = [ "index" "pager" ];
key = "t";
action = "previous-undeleted";
}
{
map = [ "generic" "index" "pager" ];
key = "\\Ce";
action = "half-down";
}
{
map = [ "generic" "index" "pager" ];
key = "\\Cu";
action = "half-up";
}
];
extraConfig = ''
ignore X-Mailer
# Colors
# Diff changes
color body brightgreen default "^[+].*"
color body brightred default "^[-].*"
# Diff file
color body green default "^[-][-][-] .*"
color body green default "^[+][+][+] .*"
# Diff header
color body green default "^diff .*"
color body green default "^index .*"
# Diff chunk
color body cyan default "^@@ .*"
# Linked issue
color body brightgreen default "^(close[ds]*|fix(e[ds])*|resolve[sd]*):* *#[0-9]+$"
# Credit
color body brightwhite default "(signed-off|co-authored)-by: .*"
# Subject
color header brightwhite default "Subject"
# Index
color index brightwhite default '~U'
color index brightblue default '~(~P)'
color index brightyellow default '~p'
color index brightgreen default '~p =s applied'
'';
};
}