40 lines
1021 B
Nix
40 lines
1021 B
Nix
# Mail stack:
|
|
# Read and write emails neomutt
|
|
# Receive emails & synchronize maildir offlineimap
|
|
# Submit emails to send msmtp
|
|
# dealing with MIME encoded email packages ripmime
|
|
# Display HTML emails w3m
|
|
# Search maildirs mu
|
|
# and various automation provided by systemd
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
environment.systemPackages = with pkgs; [
|
|
msmtp
|
|
neomutt
|
|
ripmime
|
|
w3m
|
|
(mu.override { withMug = false; }) # no webkit dependency
|
|
];
|
|
|
|
services.offlineimap = {
|
|
enable = true;
|
|
onCalendar = "*:0/5";
|
|
};
|
|
|
|
systemd.user.services = {
|
|
mu = {
|
|
description = "Updating mail database";
|
|
script = "/run/current-system/sw/bin/mu index --quiet -m ~/mail";
|
|
startAt = "daily";
|
|
wantedBy = [ "timers.target" ];
|
|
};
|
|
|
|
offlineimap-fast = {
|
|
description = "Quick mail synchronization";
|
|
script = "/run/current-system/sw/bin/offlineimap -u quiet -q";
|
|
};
|
|
};
|
|
|
|
}
|