2023-03-06 15:05:35 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
2023-01-01 21:30:41 +01:00
|
|
|
let
|
|
|
|
gpg-default-key = "116987A8DD3F78FF8601BF4DB95E8FE6B11C4D09";
|
|
|
|
in
|
|
|
|
{
|
2023-02-26 01:02:01 +01:00
|
|
|
sops.secrets = {
|
2023-03-06 15:05:35 +01:00
|
|
|
"email/rfive" = { };
|
|
|
|
"email/tu-dresden" = { };
|
|
|
|
"email/ifsr" = { };
|
|
|
|
"email/google" = { };
|
2023-02-26 01:02:01 +01:00
|
|
|
};
|
2023-01-27 12:09:49 +01:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
imv
|
|
|
|
w3m
|
2023-01-27 12:32:08 +01:00
|
|
|
urlview
|
2023-01-27 12:09:49 +01:00
|
|
|
];
|
|
|
|
services.mbsync.enable = true;
|
2023-02-26 01:02:01 +01:00
|
|
|
systemd.user.services.mbsync.Unit.After = [ "sops-nix.service" ];
|
2023-01-27 00:24:24 +01:00
|
|
|
programs = {
|
|
|
|
neomutt = {
|
|
|
|
enable = true;
|
|
|
|
sidebar.enable = true;
|
2023-01-27 11:22:49 +01:00
|
|
|
checkStatsInterval = 30;
|
2023-01-27 00:24:24 +01:00
|
|
|
extraConfig = ''
|
2023-01-27 11:22:49 +01:00
|
|
|
bind pager <Space> noop
|
|
|
|
bind index,pager \Cp sidebar-prev
|
|
|
|
# Move the highlight to the next mailbox
|
|
|
|
bind index,pager \Cn sidebar-next
|
|
|
|
# Open the highlighted mailbox
|
|
|
|
bind index,pager <space><return> sidebar-open
|
2023-01-27 12:09:49 +01:00
|
|
|
set mailcap_path = ${./mailcap}
|
2023-04-03 21:12:46 +02:00
|
|
|
source ${./vim-keys.muttrc}
|
2023-01-27 00:24:24 +01:00
|
|
|
source ${./dracula.muttrc}
|
2023-04-03 21:12:46 +02:00
|
|
|
source ${./powerline.muttrc}
|
2023-01-27 00:24:24 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
mbsync.enable = true;
|
|
|
|
msmtp.enable = true;
|
2023-04-20 09:40:24 +02:00
|
|
|
notmuch.enable = true;
|
2023-01-27 00:24:24 +01:00
|
|
|
};
|
2023-01-01 21:30:41 +01:00
|
|
|
accounts.email.accounts = {
|
|
|
|
"rouven@rfive.de" = rec {
|
|
|
|
address = "rouven@rfive.de";
|
|
|
|
gpg.key = gpg-default-key;
|
|
|
|
realName = "Rouven Seifert";
|
|
|
|
userName = address;
|
2023-02-26 01:02:01 +01:00
|
|
|
passwordCommand = "${pkgs.coreutils}/bin/cat $XDG_RUNTIME_DIR/secrets/email/rfive";
|
2023-01-01 21:30:41 +01:00
|
|
|
imap = {
|
|
|
|
host = "pro1.mail.ovh.net";
|
|
|
|
port = 993;
|
|
|
|
};
|
|
|
|
smtp = {
|
|
|
|
host = "pro1.mail.ovh.net";
|
|
|
|
port = 587;
|
2023-01-02 13:18:57 +01:00
|
|
|
tls.useStartTls = true;
|
2023-01-01 21:30:41 +01:00
|
|
|
};
|
2023-01-27 11:22:49 +01:00
|
|
|
msmtp.enable = true;
|
2023-01-27 00:24:24 +01:00
|
|
|
mbsync = {
|
|
|
|
enable = true;
|
|
|
|
create = "maildir";
|
2023-01-27 21:38:23 +01:00
|
|
|
expunge = "both";
|
|
|
|
groups.rfive = {
|
2023-01-28 14:53:23 +01:00
|
|
|
channels.inbox = {
|
|
|
|
nearPattern = "INBOX";
|
|
|
|
farPattern = "INBOX";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
2023-01-27 21:38:23 +01:00
|
|
|
channels.trash = {
|
|
|
|
nearPattern = "Trash";
|
|
|
|
farPattern = "Gel&APY-schte Elemente";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
|
|
|
channels.sent = {
|
|
|
|
nearPattern = "Sent";
|
|
|
|
farPattern = "Gesendete Elemente";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
2023-01-28 14:53:23 +01:00
|
|
|
channels.junk = {
|
|
|
|
nearPattern = "Junk";
|
|
|
|
farPattern = "Junk-E-Mail";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
2023-01-27 21:38:23 +01:00
|
|
|
channels.drafts = {
|
|
|
|
nearPattern = "Drafts";
|
|
|
|
farPattern = "Entw&APw-rfe";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
|
|
|
};
|
2023-01-27 00:24:24 +01:00
|
|
|
extraConfig = {
|
|
|
|
account = {
|
|
|
|
AuthMechs = "Login";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-03-06 15:05:35 +01:00
|
|
|
neomutt = let c = mbsync.groups.rfive.channels; in
|
|
|
|
{
|
|
|
|
enable = true;
|
|
|
|
mailboxName = " rfive.de";
|
|
|
|
extraMailboxes = lib.lists.forEach [ c.sent c.trash c.junk c.drafts ] (x: x.nearPattern);
|
|
|
|
};
|
2023-01-01 21:30:41 +01:00
|
|
|
};
|
2023-03-06 15:05:35 +01:00
|
|
|
"TU-Dresden" = rec {
|
2023-01-01 21:30:41 +01:00
|
|
|
address = "rouven.seifert@mailbox.tu-dresden.de";
|
|
|
|
gpg.key = gpg-default-key;
|
|
|
|
realName = "Rouven Seifert";
|
2023-01-27 00:24:24 +01:00
|
|
|
userName = "rose159e";
|
2023-02-26 01:02:01 +01:00
|
|
|
passwordCommand = "${pkgs.coreutils}/bin/cat $XDG_RUNTIME_DIR/secrets/email/tu-dresden";
|
2023-01-01 21:30:41 +01:00
|
|
|
imap = {
|
|
|
|
host = "msx.tu-dresden.de";
|
|
|
|
port = 993;
|
|
|
|
};
|
|
|
|
smtp = {
|
|
|
|
host = "msx.tu-dresden.de";
|
|
|
|
port = 587;
|
2023-01-02 13:18:57 +01:00
|
|
|
tls.useStartTls = true;
|
2023-01-01 21:30:41 +01:00
|
|
|
};
|
2023-01-27 00:24:24 +01:00
|
|
|
mbsync = {
|
|
|
|
enable = true;
|
|
|
|
create = "maildir";
|
2023-01-27 21:38:23 +01:00
|
|
|
expunge = "both";
|
|
|
|
groups.tud = {
|
2023-01-28 14:53:23 +01:00
|
|
|
channels.inbox = {
|
|
|
|
nearPattern = "INBOX";
|
|
|
|
farPattern = "INBOX";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
|
|
|
channels.opal = {
|
|
|
|
nearPattern = "Opal";
|
|
|
|
farPattern = "Opal";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
2023-01-27 21:38:23 +01:00
|
|
|
channels.trash = {
|
|
|
|
nearPattern = "Trash";
|
|
|
|
farPattern = "Gel&APY-schte Elemente";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
|
|
|
channels.sent = {
|
|
|
|
nearPattern = "Sent";
|
|
|
|
farPattern = "Gesendete Elemente";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
2023-01-28 14:53:23 +01:00
|
|
|
channels.junk = {
|
|
|
|
nearPattern = "Junk";
|
|
|
|
farPattern = "Junk-E-Mail";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
2023-01-27 21:38:23 +01:00
|
|
|
channels.drafts = {
|
|
|
|
nearPattern = "Drafts";
|
|
|
|
farPattern = "Entw&APw-rfe";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
|
|
|
};
|
2023-01-27 00:24:24 +01:00
|
|
|
extraConfig = {
|
|
|
|
account = {
|
|
|
|
AuthMechs = "Login";
|
|
|
|
};
|
|
|
|
};
|
2023-01-01 21:30:41 +01:00
|
|
|
};
|
2023-01-27 00:24:24 +01:00
|
|
|
msmtp.enable = true;
|
2023-04-20 09:40:24 +02:00
|
|
|
notmuch.enable = true;
|
2023-03-06 15:05:35 +01:00
|
|
|
neomutt = let c = mbsync.groups.tud.channels; in
|
|
|
|
{
|
|
|
|
enable = true;
|
|
|
|
mailboxName = " TU Dresden";
|
|
|
|
extraMailboxes = lib.lists.forEach [ c.opal c.sent c.trash c.junk c.drafts ] (x: x.nearPattern);
|
|
|
|
};
|
2023-01-27 11:22:49 +01:00
|
|
|
};
|
2023-03-06 15:05:35 +01:00
|
|
|
"iFSR" = rec {
|
2023-01-31 16:16:03 +01:00
|
|
|
address = "rouven.seifert@ifsr.de";
|
2023-02-28 15:05:07 +01:00
|
|
|
primary = true;
|
2023-01-31 16:16:03 +01:00
|
|
|
gpg.key = gpg-default-key;
|
|
|
|
realName = "Rouven Seifert";
|
|
|
|
userName = "rouven.seifert";
|
2023-02-26 01:02:01 +01:00
|
|
|
passwordCommand = "${pkgs.coreutils}/bin/cat $XDG_RUNTIME_DIR/secrets/email/ifsr";
|
2023-01-31 16:16:03 +01:00
|
|
|
imap = {
|
|
|
|
host = "mail.ifsr.de";
|
|
|
|
port = 143;
|
|
|
|
tls.useStartTls = true;
|
|
|
|
};
|
|
|
|
smtp = {
|
|
|
|
host = "mail.ifsr.de";
|
|
|
|
port = 587;
|
|
|
|
tls.useStartTls = true;
|
|
|
|
};
|
|
|
|
mbsync = {
|
|
|
|
enable = true;
|
|
|
|
create = "maildir";
|
|
|
|
expunge = "both";
|
|
|
|
groups.ifsr = {
|
|
|
|
channels.inbox = {
|
|
|
|
nearPattern = "INBOX";
|
|
|
|
farPattern = "INBOX";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
2023-03-06 15:05:35 +01:00
|
|
|
channels.admin = {
|
|
|
|
nearPattern = "Admin spam";
|
|
|
|
farPattern = "Admin spam";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
2023-01-31 16:16:03 +01:00
|
|
|
channels.trash = {
|
|
|
|
nearPattern = "Trash";
|
|
|
|
farPattern = "Trash";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
|
|
|
channels.sent = {
|
|
|
|
nearPattern = "Sent";
|
|
|
|
farPattern = "Sent";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
2023-02-02 12:31:38 +01:00
|
|
|
channels.junk = {
|
|
|
|
nearPattern = "Junk";
|
|
|
|
farPattern = "Public/Spam";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
2023-01-31 16:16:03 +01:00
|
|
|
channels.drafts = {
|
|
|
|
nearPattern = "Drafts";
|
|
|
|
farPattern = "Drafts";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
extraConfig = {
|
|
|
|
account = {
|
|
|
|
AuthMechs = "Login";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
msmtp.enable = true;
|
2023-04-30 21:50:47 +02:00
|
|
|
# notmuch.enable = true;
|
|
|
|
notmuch = {
|
|
|
|
enable = true;
|
|
|
|
neomutt = {
|
|
|
|
enable = true;
|
|
|
|
virtualMailboxes = [
|
|
|
|
{
|
|
|
|
name = "IFSR-Unread";
|
|
|
|
query = "folder:iFSR/Inbox tag:unread";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2023-03-06 15:05:35 +01:00
|
|
|
neomutt = let c = mbsync.groups.ifsr.channels; in
|
|
|
|
{
|
2023-04-12 22:09:46 +02:00
|
|
|
enable = true;
|
|
|
|
mailboxName = " iFSR";
|
|
|
|
extraMailboxes = lib.lists.forEach [ c.admin c.sent c.trash c.junk c.drafts ] (x: x.nearPattern);
|
|
|
|
};
|
2023-01-31 16:16:03 +01:00
|
|
|
};
|
2023-01-27 11:22:49 +01:00
|
|
|
"gmail" = rec {
|
|
|
|
address = "seifertrouven@gmail.com";
|
|
|
|
realName = "Rouven Seifert";
|
|
|
|
userName = address;
|
2023-02-26 01:02:01 +01:00
|
|
|
passwordCommand = "${pkgs.coreutils}/bin/cat $XDG_RUNTIME_DIR/secrets/email/google";
|
2023-01-27 11:22:49 +01:00
|
|
|
imap = {
|
|
|
|
host = "imap.gmail.com";
|
|
|
|
port = 993;
|
|
|
|
};
|
|
|
|
smtp = {
|
|
|
|
host = "smtp.gmail.com";
|
|
|
|
port = 465;
|
|
|
|
};
|
|
|
|
mbsync = {
|
|
|
|
enable = true;
|
|
|
|
create = "maildir";
|
2023-01-27 21:38:23 +01:00
|
|
|
expunge = "both";
|
2023-03-06 15:05:35 +01:00
|
|
|
groups.gmail = {
|
2023-01-28 14:53:23 +01:00
|
|
|
channels.inbox = {
|
|
|
|
nearPattern = "INBOX";
|
|
|
|
farPattern = "INBOX";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
2023-01-27 21:38:23 +01:00
|
|
|
channels.trash = {
|
|
|
|
nearPattern = "Trash";
|
|
|
|
farPattern = "[Gmail]/Papierkorb";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
|
|
|
channels.sent = {
|
|
|
|
nearPattern = "Sent";
|
|
|
|
farPattern = "[Gmail]/Gesendet";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
2023-01-28 14:53:23 +01:00
|
|
|
channels.junk = {
|
|
|
|
nearPattern = "Junk";
|
|
|
|
farPattern = "[Gmail]/Spam";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
2023-01-27 21:38:23 +01:00
|
|
|
channels.drafts = {
|
|
|
|
nearPattern = "Drafts";
|
|
|
|
farPattern = "[Gmail]/Entw&APw-rfe";
|
|
|
|
extraConfig.Create = "near";
|
|
|
|
};
|
|
|
|
};
|
2023-01-27 11:22:49 +01:00
|
|
|
extraConfig = {
|
|
|
|
account = {
|
|
|
|
AuthMechs = "Login";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
msmtp.enable = true;
|
2023-04-30 21:50:47 +02:00
|
|
|
# notmuch.enable = true;
|
|
|
|
notmuch = {
|
|
|
|
enable = true;
|
|
|
|
neomutt = {
|
|
|
|
enable = true;
|
|
|
|
virtualMailboxes = [
|
|
|
|
{
|
|
|
|
name = "gmail-Unread";
|
|
|
|
query = "tag:unread";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2023-03-06 15:05:35 +01:00
|
|
|
neomutt = let c = mbsync.groups.gmail.channels; in
|
|
|
|
{
|
2023-04-12 22:09:46 +02:00
|
|
|
enable = true;
|
|
|
|
mailboxName = " gmail";
|
|
|
|
extraMailboxes = lib.lists.forEach [ c.sent c.trash c.junk c.drafts ] (x: x.nearPattern);
|
|
|
|
};
|
2023-01-01 21:30:41 +01:00
|
|
|
};
|
|
|
|
};
|
2023-01-27 12:32:08 +01:00
|
|
|
home.file.".urlview".text = ''
|
2023-02-04 22:46:46 +01:00
|
|
|
COMMAND qutebrowser %s &> /dev/null
|
2023-01-27 12:32:08 +01:00
|
|
|
'';
|
2023-01-01 21:30:41 +01:00
|
|
|
}
|