mirror of
https://github.com/Feliix42/dotfiles.git
synced 2024-11-22 06: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
|
# periodic automated mail fetching
|
||||||
systemd.user.services.mailfetch = {
|
systemd.user.services.mbsync = {
|
||||||
enable = true;
|
description = "Automated mail fetch and tagging";
|
||||||
description = "Automatically fetches new mails.";
|
|
||||||
wantedBy = [ "graphical-session.target" ];
|
|
||||||
after = [ "graphical-session.target" ];
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = "always";
|
Type = "oneshot";
|
||||||
RestartSec = "60";
|
|
||||||
};
|
};
|
||||||
path = with pkgs; [ bash notmuch isync ];
|
path = with pkgs; [ bash isync notmuch ];
|
||||||
script = ''
|
script = "mbsync -a";
|
||||||
mbsync -a && /home/felix/.config/neomutt/notmuch-hook.sh
|
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
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
|
Loading…
Reference in a new issue