mail: tag everything once a day
This commit is contained in:
parent
78e2929daf
commit
a5aad14aec
1 changed files with 23 additions and 1 deletions
|
@ -270,6 +270,28 @@
|
||||||
|
|
||||||
# configure mbsync
|
# configure mbsync
|
||||||
home-manager.users.mailUser.programs.mbsync.enable = true;
|
home-manager.users.mailUser.programs.mbsync.enable = true;
|
||||||
|
|
||||||
|
# re-tag everything once a day
|
||||||
|
systemd.services.retagmail = {
|
||||||
|
enable = true;
|
||||||
|
serviceConfig = { User = config.users.users.mailUser.name; };
|
||||||
|
environment.NOTMUCH_CONFIG =
|
||||||
|
"${config.users.users.mailUser.home}/.config/notmuch/notmuchrc";
|
||||||
|
script = ''
|
||||||
|
echo "run afew"
|
||||||
|
${pkgs.afew}/bin/afew --all --tag -v
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
systemd.timers.retagmail = {
|
||||||
|
enable = true;
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "daily";
|
||||||
|
Persistent = "true";
|
||||||
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# fetch mails every 10 minutes
|
||||||
systemd.services.fetchmail = {
|
systemd.services.fetchmail = {
|
||||||
enable = true;
|
enable = true;
|
||||||
serviceConfig = { User = config.users.users.mailUser.name; };
|
serviceConfig = { User = config.users.users.mailUser.name; };
|
||||||
|
@ -515,7 +537,7 @@
|
||||||
tags = [ "-inbox" "-unread" ];
|
tags = [ "-inbox" "-unread" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
query = "tag:lists AND from:nixos1@discoursemail.com";
|
query = "from:nixos1@discoursemail.com";
|
||||||
tags = [ "+nixos" "+discourse" ];
|
tags = [ "+nixos" "+discourse" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue