1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-19 14:53:00 +00:00
home-manager/modules/services/imapnotify-accounts.nix
Coutinho de Souza dd21b9afd5 imapnotify: add extraArgs option to imapnotify-accounts
`wait` is no longer a part of the goimapnotify's config, but one of its
cli options.
2025-02-22 06:33:32 -08:00

46 lines
1.2 KiB
Nix

{ pkgs, 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.";
};
extraArgs = mkOption {
type = types.listOf types.str;
default = [ ];
example = [ "-wait 1" ];
description = "Extra arguments to pass to goimapnotify.";
};
extraConfig = mkOption {
type = let jsonFormat = pkgs.formats.json { }; in jsonFormat.type;
default = { };
description = "Additional configuration to add for this account.";
};
};
}