1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-13 10:13:39 +02:00

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
{ };
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)
// lib.optionalAttrs (!isNull account.gpg) (pgpCfg account)
// account.aerc.extraAccounts;
mkAccountConfig = name: account:

View File

@ -91,3 +91,9 @@ from = test <test@email.invalid>
outgoing = imap+plain://intentionallyWrong:PaSsWorD@smtp.host.invalid:1337
postpone = dRaFts
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";
};
};
};
};
}