Skip to content

Instantly share code, notes, and snippets.

@jethrokuan
Created September 23, 2018 06:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jethrokuan/53c7ce64e4a74c90ec77dfba139852fb to your computer and use it in GitHub Desktop.
Save jethrokuan/53c7ce64e4a74c90ec77dfba139852fb to your computer and use it in GitHub Desktop.
NixOS email setup
{pkgs, ...}:
{
environment.systemPackages = with pkgs; [
pass
isyncUnstable
msmtp
notmuch
pinentry_qt5
];
systemd.user = {
services.mbsync = {
description = "Mailbox syncronization";
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.isyncUnstable}/bin/mbsync -aq";
};
path = with pkgs; [gawk gnupg pass];
after = [ "network-online.target" "gpg-agent.service" ];
wantedBy = [ "default.target" ];
};
timers.mbsync = {
description = "Mailbox syncronization";
timerConfig = {
OnCalendar = "*:0/2";
Persistent = "true";
};
wantedBy = [ "timers.target" ];
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment