Basic neomutt configuration
This commit is contained in:
parent
7002059702
commit
262390b00c
1 changed files with 62 additions and 1 deletions
|
@ -3,7 +3,7 @@ let
|
||||||
passwordScript = pkgs.writeScript "get_mail_password" ''
|
passwordScript = pkgs.writeScript "get_mail_password" ''
|
||||||
#!${pkgs.bash}/bin/bash
|
#!${pkgs.bash}/bin/bash
|
||||||
|
|
||||||
pass show "$@" | head -n1 | tr -d "\n"
|
${pkgs.pass}/bin/pass show "$@" | head -n1 | tr -d "\n"
|
||||||
'';
|
'';
|
||||||
baseAccount = {
|
baseAccount = {
|
||||||
gpg = {
|
gpg = {
|
||||||
|
@ -24,6 +24,10 @@ in
|
||||||
{ path = ".local/share/offlineimap"; type = "data"; }
|
{ path = ".local/share/offlineimap"; type = "data"; }
|
||||||
];
|
];
|
||||||
home-manager.users.charlotte = { ... }: {
|
home-manager.users.charlotte = { ... }: {
|
||||||
|
home.file.".mailcap".text = ''
|
||||||
|
text/html; ${pkgs.firefox}/bin/firefox %s ; nametemplate=%s.html; needsterminal
|
||||||
|
text/html; ${pkgs.w3m}/bin/w3m -I %{charset} -T text/html ; copiousoutput; nametemplate=%s.html
|
||||||
|
'';
|
||||||
accounts.email = {
|
accounts.email = {
|
||||||
maildirBasePath = "mail";
|
maildirBasePath = "mail";
|
||||||
accounts = {
|
accounts = {
|
||||||
|
@ -46,6 +50,10 @@ in
|
||||||
onNotify = "${pkgs.offlineimap}/bin/offlineimap -a personal -f INBOX";
|
onNotify = "${pkgs.offlineimap}/bin/offlineimap -a personal -f INBOX";
|
||||||
onNotifyPost = { mail = "${pkgs.libnotify}/bin/notify-send 'New mail arrived'"; };
|
onNotifyPost = { mail = "${pkgs.libnotify}/bin/notify-send 'New mail arrived'"; };
|
||||||
};
|
};
|
||||||
|
neomutt = {
|
||||||
|
enable = true;
|
||||||
|
sendMailCommand = "msmtpq --read-envelope-from --read-recipients --account personal";
|
||||||
|
};
|
||||||
passwordCommand = "${passwordScript} mail/Personal";
|
passwordCommand = "${passwordScript} mail/Personal";
|
||||||
primary = true;
|
primary = true;
|
||||||
smtp = {
|
smtp = {
|
||||||
|
@ -74,6 +82,10 @@ in
|
||||||
onNotify = "${pkgs.offlineimap}/bin/offlineimap -a work -f INBOX";
|
onNotify = "${pkgs.offlineimap}/bin/offlineimap -a work -f INBOX";
|
||||||
onNotifyPost = { mail = "${pkgs.libnotify}/bin/notify-send 'New mail arrived'"; };
|
onNotifyPost = { mail = "${pkgs.libnotify}/bin/notify-send 'New mail arrived'"; };
|
||||||
};
|
};
|
||||||
|
neomutt = {
|
||||||
|
enable = true;
|
||||||
|
sendMailCommand = "msmtpq --read-envelope-from --read-recipients --account work";
|
||||||
|
};
|
||||||
passwordCommand = "${passwordScript} work/UGentNet";
|
passwordCommand = "${passwordScript} work/UGentNet";
|
||||||
smtp = {
|
smtp = {
|
||||||
host = "smtp.office365.com";
|
host = "smtp.office365.com";
|
||||||
|
@ -104,6 +116,10 @@ in
|
||||||
onNotify = "${pkgs.offlineimap}/bin/offlineimap -a work -f INBOX";
|
onNotify = "${pkgs.offlineimap}/bin/offlineimap -a work -f INBOX";
|
||||||
onNotifyPost = { mail = "${pkgs.libnotify}/bin/notify-send 'New mail arrived'"; };
|
onNotifyPost = { mail = "${pkgs.libnotify}/bin/notify-send 'New mail arrived'"; };
|
||||||
};
|
};
|
||||||
|
neomutt = {
|
||||||
|
enable = true;
|
||||||
|
sendMailCommand = "msmtpq --read-envelope-from --read-recipients --account posteo";
|
||||||
|
};
|
||||||
passwordCommand = "${passwordScript} mail/Posteo";
|
passwordCommand = "${passwordScript} mail/Posteo";
|
||||||
smtp = {
|
smtp = {
|
||||||
host = "posteo.de";
|
host = "posteo.de";
|
||||||
|
@ -112,10 +128,55 @@ in
|
||||||
};
|
};
|
||||||
userName = "chvp@posteo.net";
|
userName = "chvp@posteo.net";
|
||||||
};
|
};
|
||||||
|
jonggroen = baseAccount // {
|
||||||
|
address = "charlotte@jonggroen.be";
|
||||||
|
flavor = "gmail.com";
|
||||||
|
folders = {
|
||||||
|
drafts = "[Gmail].Drafts";
|
||||||
|
inbox = "INBOX";
|
||||||
|
sent = "[Gmail].Sent Mail";
|
||||||
|
trash = "[Gmail].Bin";
|
||||||
|
};
|
||||||
|
imap = {
|
||||||
|
host = "imap.gmail.com";
|
||||||
|
port = 993;
|
||||||
|
tls.enable = true;
|
||||||
|
};
|
||||||
|
imapnotify = {
|
||||||
|
enable = true;
|
||||||
|
boxes = [ "INBOX" ];
|
||||||
|
onNotify = "${pkgs.offlineimap}/bin/offlineimap -a jonggroen -f INBOX";
|
||||||
|
onNotifyPost = { mail = "${pkgs.libnotify}/bin/notify-send 'New mail arrived'"; };
|
||||||
|
};
|
||||||
|
neomutt = {
|
||||||
|
enable = true;
|
||||||
|
sendMailCommand = "msmtpq --read-envelope-from --read-recipients --account jonggroen";
|
||||||
|
};
|
||||||
|
passwordCommand = "${passwordScript} jonggroen/GoogleAppMail";
|
||||||
|
smtp = {
|
||||||
|
host = "smtp.gmail.com";
|
||||||
|
port = 587;
|
||||||
|
tls = {
|
||||||
|
enable = true;
|
||||||
|
useStartTls = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
userName = "charlotte@jonggroen.be";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
msmtp.enable = true;
|
msmtp.enable = true;
|
||||||
|
neomutt = {
|
||||||
|
enable = true;
|
||||||
|
sidebar = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
auto_view text/html
|
||||||
|
'';
|
||||||
|
vimKeys = true;
|
||||||
|
};
|
||||||
offlineimap.enable = true;
|
offlineimap.enable = true;
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue