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