mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
f5b03feb33
Prior to this change, it was impossible to nest attrsets in accounts.email.accounts.<name>.imapnotify.extraConfig. However, goimapnotify's configuration is JSON-based, and the recommended configuration has: ``` "tlsOptions": { "rejectUnauthorized": true }, ``` This change changes the type from an attrset of str/int/bool to the JSON type provided by nixpkg's `pkgs.formats.json`.
40 lines
1 KiB
Nix
40 lines
1 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.";
|
|
};
|
|
|
|
extraConfig = mkOption {
|
|
type = let jsonFormat = pkgs.formats.json { }; in jsonFormat.type;
|
|
default = { };
|
|
example = { wait = 10; };
|
|
description = "Additional configuration to add for this account.";
|
|
};
|
|
};
|
|
}
|