aerc: respect accounts' GPG configurations

Fixes #4828.
This commit is contained in:
Berk Ozkutuk 2023-12-30 14:04:32 +01:00
parent e13aa9e287
commit 9a431215ba
3 changed files with 20 additions and 0 deletions

View file

@ -230,7 +230,14 @@ in {
else else
{ }; { };
pgpCfg = account: {
"pgp-auto-sign" = account.gpg.signByDefault;
"pgp-opportunistic-encrypt" = account.gpg.encryptByDefault;
"pgp-key-id" = account.gpg.key;
};
in (basicCfg account) // (sourceCfg account) // (outgoingCfg account) in (basicCfg account) // (sourceCfg account) // (outgoingCfg account)
// lib.optionalAttrs (!isNull account.gpg) (pgpCfg account)
// account.aerc.extraAccounts; // account.aerc.extraAccounts;
mkAccountConfig = name: account: mkAccountConfig = name: account:

View file

@ -91,3 +91,9 @@ from = test <test@email.invalid>
outgoing = imap+plain://intentionallyWrong:PaSsWorD@smtp.host.invalid:1337 outgoing = imap+plain://intentionallyWrong:PaSsWorD@smtp.host.invalid:1337
postpone = dRaFts postpone = dRaFts
source = smtp+plain://intentionallyWrong:PaSsWorD@smtp.host.invalid:1337 source = smtp+plain://intentionallyWrong:PaSsWorD@smtp.host.invalid:1337
[q_gpg]
from = Foo Bar <addr@mail.invalid>
pgp-auto-sign = true
pgp-key-id = 00112233445566778899AABBCCDDEEFF
pgp-opportunistic-encrypt = true

View file

@ -260,6 +260,13 @@ with lib;
}; };
}; };
}; };
q_gpg = basics // {
gpg = {
signByDefault = true;
encryptByDefault = true;
key = "00112233445566778899AABBCCDDEEFF";
};
};
}; };
}; };
} }