1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-26 16:38:34 +02:00

alot: set primary email first (#1826)

Alot uses the first email in the config as primary email. Because the
order in which the email.accounts were sorted was alphabetical, the account
set to `primary = true` was not put first in the alot config and thus
not considered as primary email for alot.

This was fixed by sorting the email accounts again such that accounts
with `primary = true` come first.
This commit is contained in:
Rien 2021-02-27 21:41:16 +01:00 committed by GitHub
parent e7b1491fb8
commit fb9bf032fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,9 +7,12 @@ let
cfg = config.programs.alot;
alotAccounts =
enabledAccounts =
filter (a: a.notmuch.enable) (attrValues config.accounts.email.accounts);
# sorted: primary first
alotAccounts = sort (a: b: !(a.primary -> b.primary)) enabledAccounts;
boolStr = v: if v then "True" else "False";
mkKeyValue = key: value: