thinkpad-nixos: Add a timer to download mails

This commit is contained in:
traxys 2023-05-31 11:50:53 +02:00
parent 7588467bde
commit 76513bf1b6

View file

@ -221,7 +221,7 @@
enable = true;
new.tags = ["new"];
hooks = {
preNew = "mbsync --all";
preNew = "${pkgs.isync}/bin/mbsync --all";
postNew = let
mkProjectMatch = project: "subject:'/PATCH\\s${project}/'";
mkProjectMatches = labels: lib.concatStringsSep " or " (builtins.map mkProjectMatch labels);
@ -284,6 +284,26 @@
};
};
systemd.user.services.notmuch-new = {
Unit = {Description = "notmuch synchronization";};
Service = {
Type = "oneshot";
ExecStart = "${pkgs.notmuch}/bin/notmuch new";
};
};
systemd.user.timers.notmuch = {
Unit = {Description = "notmuch synchronization";};
Timer = {
OnCalendar = "*:0/5";
Unit = "notmuch-new.service";
};
Install = {WantedBy = ["default.target"];};
};
xdg.desktopEntries.teams = {
name = "teams";
exec = "${pkgs.chromium}/bin/chromium --app=https://teams.microsoft.com";