mirror of
https://github.com/Feliix42/dotfiles.git
synced 2024-11-21 22:06:29 +00:00
add mailfetch service
This commit is contained in:
parent
132dbd6701
commit
fc183208cf
1 changed files with 30 additions and 11 deletions
|
@ -376,21 +376,40 @@
|
|||
];
|
||||
|
||||
# periodic automated mail fetching
|
||||
systemd.user.services.mailfetch = {
|
||||
enable = true;
|
||||
description = "Automatically fetches new mails.";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
systemd.user.services.mbsync = {
|
||||
description = "Automated mail fetch and tagging";
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = "60";
|
||||
Type = "oneshot";
|
||||
};
|
||||
path = with pkgs; [ bash notmuch isync ];
|
||||
script = ''
|
||||
mbsync -a && /home/felix/.config/neomutt/notmuch-hook.sh
|
||||
'';
|
||||
path = with pkgs; [ bash isync notmuch ];
|
||||
script = "mbsync -a";
|
||||
postStop = "/home/felix/.config/neomutt/notmuch-hook.sh";
|
||||
};
|
||||
|
||||
systemd.user.timers.mbsync = {
|
||||
description = "Automated mail fetch and processing";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "10m";
|
||||
OnUnitInactiveSec = "10m";
|
||||
};
|
||||
};
|
||||
|
||||
# systemd.user.services.mailfetch = {
|
||||
# enable = true;
|
||||
# description = "Automatically fetches new mails.";
|
||||
# wantedBy = [ "graphical-session.target" ];
|
||||
# after = [ "graphical-session.target" ];
|
||||
# serviceConfig = {
|
||||
# Restart = "always";
|
||||
# RestartSec = "60";
|
||||
# };
|
||||
# path = with pkgs; [ bash notmuch isync ];
|
||||
# script = ''
|
||||
# mbsync -a && /home/felix/.config/neomutt/notmuch-hook.sh
|
||||
# '';
|
||||
# };
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
|
Loading…
Reference in a new issue