imapnotify. aerc settings. other misc mail stuff
This commit is contained in:
parent
0b5f35d274
commit
8cf5f022a5
3 changed files with 50 additions and 4 deletions
|
|
@ -101,7 +101,7 @@ in
|
|||
|
||||
services.mbsync = {
|
||||
enable = true;
|
||||
frequency = "*:0/5"; # every 5 minutes
|
||||
frequency = "*:0/15"; # every 15 minutes
|
||||
};
|
||||
|
||||
services.vdirsyncer = {
|
||||
|
|
|
|||
15
home-mac.nix
15
home-mac.nix
|
|
@ -20,13 +20,23 @@
|
|||
'';
|
||||
};
|
||||
|
||||
services.imapnotify.enable = true;
|
||||
|
||||
# Add PATH to imapnotify service so it can find pass
|
||||
launchd.agents.imapnotify-FastMail.config.EnvironmentVariables = {
|
||||
PATH = "${pkgs.pass}/bin:${pkgs.gnupg}/bin:/usr/bin:/bin";
|
||||
};
|
||||
|
||||
launchd.agents.mbsync = {
|
||||
enable = true;
|
||||
config = {
|
||||
ProgramArguments = [ "${pkgs.isync}/bin/mbsync" "-a" ];
|
||||
StartInterval = 300; # every 5 minutes
|
||||
StartInterval = 900; # every 15 minutes
|
||||
StandardOutPath = "/tmp/mbsync.log";
|
||||
StandardErrorPath = "/tmp/mbsync.err";
|
||||
EnvironmentVariables = {
|
||||
PATH = "${pkgs.pass}/bin:${pkgs.gnupg}/bin:/usr/bin:/bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -37,6 +47,9 @@
|
|||
StartInterval = 900; # every 15 minutes
|
||||
StandardOutPath = "/tmp/vdirsyncer.log";
|
||||
StandardErrorPath = "/tmp/vdirsyncer.err";
|
||||
EnvironmentVariables = {
|
||||
PATH = "${pkgs.pass}/bin:${pkgs.gnupg}/bin:/usr/bin:/bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.mbsync.enable = true;
|
||||
|
|
@ -6,9 +6,32 @@
|
|||
programs.himalaya.enable = true;
|
||||
programs.vdirsyncer.enable = true;
|
||||
programs.khard.enable = true;
|
||||
programs.notmuch = {
|
||||
enable = true;
|
||||
new = {
|
||||
tags = [ "new" ];
|
||||
};
|
||||
hooks = {
|
||||
preNew = "mbsync -a";
|
||||
};
|
||||
};
|
||||
|
||||
accounts.email.accounts.FastMail.notmuch.enable = true;
|
||||
programs.aerc = {
|
||||
enable = true;
|
||||
extraConfig.general.unsafe-accounts-conf = true;
|
||||
extraConfig = {
|
||||
general.unsafe-accounts-conf = true;
|
||||
ui = {
|
||||
mouse-enabled = true;
|
||||
threading-enabled = true;
|
||||
};
|
||||
compose = {
|
||||
address-book-cmd = "khard email --parsable '%s'";
|
||||
};
|
||||
filters = {
|
||||
"text/html" = "${pkgs.w3m}/bin/w3m -T text/html -cols $(tput cols) -dump -o display_image=false -o display_link_number=true";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
accounts.email = {
|
||||
|
|
@ -39,6 +62,16 @@
|
|||
create = "maildir";
|
||||
expunge = "maildir";
|
||||
};
|
||||
imapnotify = {
|
||||
enable = true;
|
||||
boxes = [ "INBOX" ];
|
||||
onNotify = "${pkgs.isync}/bin/mbsync FastMail:INBOX";
|
||||
onNotifyPost = let
|
||||
notifyCmd = if pkgs.stdenv.isDarwin
|
||||
then "${pkgs.terminal-notifier}/bin/terminal-notifier -title 'New Mail' -message 'FastMail INBOX' -sound default"
|
||||
else "${pkgs.libnotify}/bin/notify-send 'New Mail' 'FastMail INBOX'";
|
||||
in notifyCmd;
|
||||
};
|
||||
msmtp.enable = true;
|
||||
aerc.enable = true;
|
||||
himalaya = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue