1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-15 07:39:46 +01:00
home-manager/modules/programs/neomutt-accounts.nix
Robert Helgesson 5be9aa417a
neomutt: fix sendMailCommand when msmtp is enabled
This resolves the error

    The option `accounts.email.accounts.xyz.neomutt.sendMailCommand`
    is defined both null and not null, in
    `…/home-manager/modules/accounts/email.nix' and
    `…/home-manager/modules/accounts/email.nix'.

that would occur previously when both neomutt and msmtp were enabled
for an account.
2020-02-16 23:08:37 +01:00

36 lines
888 B
Nix

{ config, lib, ... }:
with lib;
{
options.neomutt = {
enable = mkEnableOption "NeoMutt";
sendMailCommand = mkOption {
type = types.nullOr types.str;
default = if config.msmtp.enable then
"msmtpq --read-envelope-from --read-recipients"
else
null;
defaultText = literalExample ''
if config.msmtp.enable then
"msmtpq --read-envelope-from --read-recipients"
else
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.
'';
};
};
}