aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/programs/neomutt-accounts.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home-manager/modules/programs/neomutt-accounts.nix')
-rw-r--r--home-manager/modules/programs/neomutt-accounts.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/home-manager/modules/programs/neomutt-accounts.nix b/home-manager/modules/programs/neomutt-accounts.nix
new file mode 100644
index 00000000000..033db38eb0a
--- /dev/null
+++ b/home-manager/modules/programs/neomutt-accounts.nix
@@ -0,0 +1,34 @@
+{ 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);
+ };
+}