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:
parent
e7b1491fb8
commit
fb9bf032fb
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue