1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-27 20:29:47 +01:00
home-manager/modules/services/imapnotify-accounts.nix

41 lines
1 KiB
Nix
Raw Normal View History

{ pkgs, lib, ... }:
2019-04-09 19:34:44 +02:00
with lib;
{
options.imapnotify = {
enable = mkEnableOption "imapnotify";
onNotify = mkOption {
type = with types; either str (attrsOf str);
default = "";
2019-09-10 21:01:47 +02:00
example = "\${pkgs.isync}/bin/mbsync test-%s";
2019-04-09 19:34:44 +02:00
description = "Shell commands to run on any event.";
};
onNotifyPost = mkOption {
type = with types; either str (attrsOf str);
default = "";
2020-02-02 00:39:17 +01:00
example = {
mail =
"\${pkgs.notmuch}/bin/notmuch new && \${pkgs.libnotify}/bin/notify-send 'New mail arrived'";
};
2019-04-09 19:34:44 +02:00
description = "Shell commands to run after onNotify event.";
};
boxes = mkOption {
type = types.listOf types.str;
2020-02-02 00:39:17 +01:00
default = [ ];
2019-04-09 19:34:44 +02:00
example = [ "Inbox" "[Gmail]/MyLabel" ];
description = "IMAP folders to watch.";
};
extraConfig = mkOption {
type = let jsonFormat = pkgs.formats.json { }; in jsonFormat.type;
default = { };
example = { wait = 10; };
description = "Additional configuration to add for this account.";
};
2019-04-09 19:34:44 +02:00
};
}