72904c318c
GitOrigin-RevId: 9bf1f40af124573a54fd208b1f539eb694ef31a6
33 lines
822 B
Nix
33 lines
822 B
Nix
{ 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.";
|
|
};
|
|
};
|
|
}
|