1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-29 09:58:32 +02:00
home-manager/modules/programs/neomutt-accounts.nix
Matthieu Coudron fba87f8998
neomutt: add module
PR #1002
2020-01-26 20:46:44 +01:00

36 lines
820 B
Nix

{ config, lib, ... }:
with lib;
{
options.neomutt = {
enable = mkEnableOption "NeoMutt";
sendMailCommand = mkOption {
type = types.nullOr types.str;
default = null;
example = "msmtpq --read-envelope-from --read-recipients";
description = ''
Command to send a mail. If not set, neomutt will be in charge of sending mails.
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
example = "color status cyan default";
description = ''
Extra lines to add to the folder hook for this account.
'';
};
};
config = mkIf config.neomutt.enable {
neomutt.sendMailCommand = mkOptionDefault (
if config.msmtp.enable
then "msmtpq --read-envelope-from --read-recipients"
else null
);
};
}