splitting mail stack

This commit is contained in:
eeva 2017-03-11 15:15:13 +01:00
parent 06c04879e0
commit dd9000212b
2 changed files with 40 additions and 21 deletions

View File

@ -4,6 +4,7 @@
imports =
[
./hardware-configuration.nix
./mail.nix
#./ipv6.nix
];
@ -31,12 +32,9 @@
optipng gimp
oh-my-zsh stow
lemonbar git st
msmtp neomutt
ripmime w3m #email
nethogs
(import ./vim.nix)
(texlive.combine { inherit (texlive) scheme-small latexmk bibtex; }) #for vimtex
(mu.override { withMug = false; }) # no webkit dependency
ghostscript
pavucontrol
dell-530cdn
@ -128,10 +126,6 @@
enable = true;
stateDir = "/tmp/peerflix";
};
offlineimap = {
enable = true;
onCalendar = "*:0/5";
};
cron.enable = false;
nixosManual.enable = false;
printing = {
@ -194,20 +188,6 @@
};
};
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";
};
};
systemd.mounts = [
{ what = "/dev/sdb1";

39
mail.nix Normal file
View File

@ -0,0 +1,39 @@
# 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";
};
};
}