Enable notmuch and neomutt for email

This commit is contained in:
Evie Litherland-Smith 2024-02-29 14:16:34 +00:00
parent f697da4a91
commit 207dd26e5e

View file

@ -30,6 +30,15 @@
aliases = ["evie@xenia.me.uk" "evie@litherlandsmith.slmail.me"]; aliases = ["evie@xenia.me.uk" "evie@litherlandsmith.slmail.me"];
userName = address; userName = address;
passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/proton | head -n1"; passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/proton | head -n1";
mu.enable = lib.mkDefault accountEnabled;
neomutt.enable = lib.mkDefault accountEnabled;
msmtp = {
enable = lib.mkDefault accountEnabled;
extraConfig = {
tls = "off";
auth = "login";
};
};
mbsync = { mbsync = {
enable = lib.mkDefault accountEnabled; enable = lib.mkDefault accountEnabled;
create = "both"; create = "both";
@ -39,14 +48,10 @@
subFolders = "Verbatim"; subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN"; extraConfig.account.AuthMechs = "LOGIN";
}; };
msmtp = { notmuch = {
enable = lib.mkDefault accountEnabled; enable = lib.mkDefault accountEnabled;
extraConfig = { neomutt.enable = true;
tls = "off";
auth = "login";
};
}; };
mu.enable = lib.mkDefault accountEnabled;
}; };
icloud = let icloud = let
accountEnabled = true; accountEnabled = true;
@ -59,6 +64,9 @@
address = "e.litherlandsmith@icloud.com"; address = "e.litherlandsmith@icloud.com";
userName = address; userName = address;
passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/icloud | head -n1"; passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/icloud | head -n1";
mu.enable = lib.mkDefault accountEnabled;
neomutt.enable = lib.mkDefault accountEnabled;
msmtp.enable = lib.mkDefault accountEnabled;
mbsync = { mbsync = {
enable = lib.mkDefault accountEnabled; enable = lib.mkDefault accountEnabled;
create = "both"; create = "both";
@ -67,8 +75,10 @@
patterns = ["*" "!Notes"]; patterns = ["*" "!Notes"];
subFolders = "Verbatim"; subFolders = "Verbatim";
}; };
msmtp.enable = lib.mkDefault accountEnabled; notmuch = {
mu.enable = lib.mkDefault accountEnabled; enable = lib.mkDefault accountEnabled;
neomutt.enable = true;
};
}; };
outlook = let outlook = let
host = "127.0.0.1"; host = "127.0.0.1";
@ -90,6 +100,15 @@
aliases = ["elitherl@jet.uk"]; aliases = ["elitherl@jet.uk"];
userName = address; userName = address;
passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/outlook | head -n1"; passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/outlook | head -n1";
mu.enable = lib.mkDefault accountEnabled;
neomutt.enable = lib.mkDefault accountEnabled;
msmtp = {
enable = lib.mkDefault accountEnabled;
extraConfig = {
tls = "off";
auth = "login";
};
};
mbsync = { mbsync = {
enable = lib.mkDefault accountEnabled; enable = lib.mkDefault accountEnabled;
create = "both"; create = "both";
@ -106,18 +125,17 @@
subFolders = "Verbatim"; subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN"; extraConfig.account.AuthMechs = "LOGIN";
}; };
msmtp = { notmuch = {
enable = lib.mkDefault accountEnabled; enable = lib.mkDefault accountEnabled;
extraConfig = { neomutt.enable = true;
tls = "off";
auth = "login";
};
}; };
mu.enable = lib.mkDefault accountEnabled;
}; };
}; };
}; };
programs = { programs = {
# afew.enable = true;
# alot.enable = true;
neomutt.enable = true;
mu.enable = true; mu.enable = true;
msmtp.enable = true; msmtp.enable = true;
mbsync = { mbsync = {
@ -128,6 +146,11 @@
outlook = ["INBOX"]; outlook = ["INBOX"];
}; };
}; };
notmuch = {
enable = true;
new.tags = ["new"];
maildir.synchronizeFlags = true;
};
}; };
systemd.user.services = let systemd.user.services = let
emailAccounts = config.accounts.email.accounts; emailAccounts = config.accounts.email.accounts;