run offlineimap automatically

This commit is contained in:
willemml 2023-03-15 15:10:57 -07:00
parent e466b21416
commit 1d5b8c419d
Signed by: willemml
GPG key ID: C3DE5DF6198DACBD
2 changed files with 15 additions and 6 deletions

View file

@ -1,7 +1,7 @@
{ config, pkgs, inputs, ... }:
let
passCmd = path: "${pkgs.pass}/bin/pass ${path}";
passCmd = address: "${pkgs.python310Packages.keyring}/bin/keyring get login email(${address})";
generalAccount = address: {
inherit address;
userName = address;
@ -15,7 +15,7 @@ let
enable = true;
useStartTls = true;
};
passwordCommand = passCmd "email/${address}";
passwordCommand = passCmd address;
};
gmailAccount = address: ({

View file

@ -15,8 +15,18 @@
UserName = "${config.home.username}";
ProcessType = "Adaptive";
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/emacs-stdout.log";
StandardErrorPath =
"${config.home.homeDirectory}/Library/Logs/emacs-stderr.log";
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/emacs-stderr.log";
};
};
agents.offlineimap = {
enable = true;
config = {
ProgramArguments = [ "${pkgs.offlineimap}/bin/offlineimap" ];
UserName = "${config.home.username}";
StartInterval = 900;
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/offlineimap-stdout.log";
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/offlineimap-stderr.log";
};
};
@ -30,8 +40,7 @@
UserName = "${config.home.username}";
StartInterval = 3600;
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/rss2email-stdout.log";
StandardErrorPath =
"${config.home.homeDirectory}/Library/Logs/rss2email-stderr.log";
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/rss2email-stderr.log";
};
};
};