home-manager
home-manager copied to clipboard
introduce `accounts.email.order` for aerc accounts
Description
Nix does not preserve attrset order, instead sorting attributes by alphabetical order https://github.com/NixOS/nixpkgs/issues/81986.
However, aerc displays accounts based on their order in .config/aerc/accounts.conf
.
This PR introduces a accounts.email.order
list that provides an optional order for accounts in accounts.email.accounts
.
I implement support for this in the aerc
module, and I suspect other front-ends might also be able to benefit from this.
If a partial order is provided those will be ordered after the primary account, and any unordered accounts will be included with the previous alphabetical behavior after.
Checklist
-
[x] Change is backwards compatible.
- The primary account is still displayed first and if no order list is provided the previous behavior is maintained.
-
[x] Code formatted with
./format
. -
[x] Code tested through
nix-shell --pure tests -A run.all
ornix develop --ignore-environment .#all
using Flakes. -
[ ] Test cases updated/added. See example.
-
[x] Commit messages are formatted like
{component}: {description} {long description}
See CONTRIBUTING for more information and recent commit messages for examples.
Maintainer CC
@lukasngl