2023-04-24 16:41:29 +02:00
|
|
|
{ config, lib, ... }:
|
|
|
|
with lib; {
|
|
|
|
options = {
|
|
|
|
name = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
example = "My INBOX";
|
|
|
|
default = "My INBOX";
|
2023-07-01 01:30:13 +02:00
|
|
|
description = lib.mdDoc "Name to display";
|
2023-04-24 16:41:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
query = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
example = "tag:inbox";
|
|
|
|
default = "tag:inbox";
|
2023-07-01 01:30:13 +02:00
|
|
|
description = lib.mdDoc "Notmuch query";
|
2023-04-24 16:41:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
limit = mkOption {
|
|
|
|
type = types.nullOr types.int;
|
|
|
|
example = 10;
|
|
|
|
default = null;
|
2023-07-01 01:30:13 +02:00
|
|
|
description =
|
|
|
|
lib.mdDoc "Restricts number of messages/threads in the result.";
|
2023-04-24 16:41:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
type = mkOption {
|
|
|
|
type = types.nullOr (types.enum ([ "threads" "messages" ]));
|
|
|
|
example = "threads";
|
|
|
|
default = null;
|
2023-07-01 01:30:13 +02:00
|
|
|
description = lib.mdDoc
|
2023-04-24 16:41:29 +02:00
|
|
|
"Reads all matching messages or whole-threads. The default is 'messages' or nm_query_type.";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|