Send emails on a regular basis (don't stack forever)
This commit is contained in:
parent
dd9000212b
commit
42cb7eac04
|
@ -39,7 +39,6 @@
|
||||||
pavucontrol
|
pavucontrol
|
||||||
dell-530cdn
|
dell-530cdn
|
||||||
arandr
|
arandr
|
||||||
inotify-tools
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
22
mail.nix
22
mail.nix
|
@ -8,13 +8,15 @@
|
||||||
# and various automation provided by systemd
|
# and various automation provided by systemd
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let mu-light = (pkgs.mu.override { withMug = false; }); # no webkit dependency
|
||||||
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
msmtp
|
msmtp
|
||||||
neomutt
|
neomutt
|
||||||
ripmime
|
ripmime
|
||||||
|
mu-light
|
||||||
w3m
|
w3m
|
||||||
(mu.override { withMug = false; }) # no webkit dependency
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.offlineimap = {
|
services.offlineimap = {
|
||||||
|
@ -25,15 +27,27 @@
|
||||||
systemd.user.services = {
|
systemd.user.services = {
|
||||||
mu = {
|
mu = {
|
||||||
description = "Updating mail database";
|
description = "Updating mail database";
|
||||||
script = "/run/current-system/sw/bin/mu index --quiet -m ~/mail";
|
path = [ mu-light ];
|
||||||
|
script = "mu index --quiet -m ~/mail";
|
||||||
startAt = "daily";
|
startAt = "daily";
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
offlineimap-fast = {
|
offlineimap-fast = {
|
||||||
description = "Quick mail synchronization";
|
description = "Quick mail synchronization";
|
||||||
script = "/run/current-system/sw/bin/offlineimap -u quiet -q";
|
path = [ pkgs.offlineimap ];
|
||||||
|
script = "offlineimap -u quiet -q";
|
||||||
|
};
|
||||||
|
|
||||||
|
msmtp-runqueue = {
|
||||||
|
description = "Flushing mail queue";
|
||||||
|
script = builtins.readFile "/home/eeva/prefix/bin/msmtp-runqueue";
|
||||||
|
preStart = "mkdir -p /home/eeva/.msmtpqueue";
|
||||||
|
startAt = "*:0/10";
|
||||||
|
serviceConfig = {
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
|
path = [ pkgs.msmtp ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue