1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-14 22:42:44 +01:00

neomutt: add support for signature command (#2899)

Neomutt will run the given command (which can be a string or a path)
and take the output from stdout and use it as the signature for your
email.

Co-authored-by: Nicolas Berbiche <nicolas@normie.dev>
This commit is contained in:
Sumner Evans 2022-04-29 14:01:53 -06:00 committed by GitHub
parent 778af87a98
commit f8b51be714
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 197 additions and 6 deletions

View file

@ -196,7 +196,16 @@ let
accountStr = account:
with account;
''
let
signature = if account.signature.showSignature == "none" then
"unset signature"
else if account.signature.command != null then
''set signature = "${account.signature.command}|"''
else
"set signature = ${
pkgs.writeText "signature.txt" account.signature.text
}";
in ''
# Generated by Home Manager.
set ssl_force_tls = yes
set certificate_file=${toString config.accounts.email.certificatesFile}
@ -223,11 +232,9 @@ let
# Extra configuration
${account.neomutt.extraConfig}
'' + (if (account.signature.showSignature == "none") then ''
unset signature
'' else ''
set signature = ${pkgs.writeText "signature.txt" account.signature.text}
'') + optionalString account.notmuch.enable (notmuchSection account);
${signature}
'' + optionalString account.notmuch.enable (notmuchSection account);
in {
options = {