2018-09-30 09:06:02 +00:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
options.astroid = {
|
2023-07-01 23:45:18 +00:00
|
|
|
enable = mkEnableOption "Astroid";
|
2018-09-30 09:06:02 +00:00
|
|
|
|
|
|
|
sendMailCommand = mkOption {
|
|
|
|
type = types.str;
|
2023-07-01 23:45:18 +00:00
|
|
|
description = ''
|
2018-09-30 09:06:02 +00:00
|
|
|
Command to send a mail. If msmtp is enabled for the account,
|
|
|
|
then this is set to
|
2023-06-30 23:30:13 +00:00
|
|
|
{command}`msmtpq --read-envelope-from --read-recipients`.
|
2018-09-30 09:06:02 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
extraConfig = mkOption {
|
2020-11-30 02:54:55 +00:00
|
|
|
type = types.attrsOf types.anything;
|
2020-02-01 23:39:17 +00:00
|
|
|
default = { };
|
2018-09-30 09:06:02 +00:00
|
|
|
example = { select_query = ""; };
|
2023-07-01 23:45:18 +00:00
|
|
|
description = ''
|
2018-09-30 09:06:02 +00:00
|
|
|
Extra settings to add to this astroid account configuration.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.notmuch.enable {
|
2020-02-01 23:39:17 +00:00
|
|
|
astroid.sendMailCommand = mkIf config.msmtp.enable
|
|
|
|
(mkOptionDefault "msmtpq --read-envelope-from --read-recipients");
|
2018-09-30 09:06:02 +00:00
|
|
|
};
|
|
|
|
}
|