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:
parent
778af87a98
commit
f8b51be714
11 changed files with 197 additions and 6 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue