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