aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/home-manager/modules/services/imapnotify-accounts.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/home-manager/modules/services/imapnotify-accounts.nix')
-rw-r--r--infra/libkookie/home-manager/modules/services/imapnotify-accounts.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/infra/libkookie/home-manager/modules/services/imapnotify-accounts.nix b/infra/libkookie/home-manager/modules/services/imapnotify-accounts.nix
new file mode 100644
index 000000000000..94bdce5dfb46
--- /dev/null
+++ b/infra/libkookie/home-manager/modules/services/imapnotify-accounts.nix
@@ -0,0 +1,33 @@
+{ lib, ... }:
+
+with lib;
+
+{
+ options.imapnotify = {
+ enable = mkEnableOption "imapnotify";
+
+ onNotify = mkOption {
+ type = with types; either str (attrsOf str);
+ default = "";
+ example = "\${pkgs.isync}/bin/mbsync test-%s";
+ description = "Shell commands to run on any event.";
+ };
+
+ onNotifyPost = mkOption {
+ type = with types; either str (attrsOf str);
+ default = "";
+ example = {
+ mail =
+ "\${pkgs.notmuch}/bin/notmuch new && \${pkgs.libnotify}/bin/notify-send 'New mail arrived'";
+ };
+ description = "Shell commands to run after onNotify event.";
+ };
+
+ boxes = mkOption {
+ type = types.listOf types.str;
+ default = [ ];
+ example = [ "Inbox" "[Gmail]/MyLabel" ];
+ description = "IMAP folders to watch.";
+ };
+ };
+}