Files
home-manager/tests/modules/programs/aerc/notmuch-legacy.nix
Austin Horstman 14a1ad8d3e aerc: match notmuch config to package version
Aerc 0.22 discovers its notmuch database automatically and deprecates
path-bearing sources and maildir-store. Preserve those settings for
packages older than 0.22 while using the bare source for newer packages
or package = null. Keep maildir-account-path for both versions and cover
the legacy and null-package paths with golden tests.
2026-10-02 09:04:53 -05:00

30 lines
713 B
Nix

{ config, pkgs, ... }:
{
programs.aerc = {
enable = true;
package = config.lib.test.mkStubPackage { version = "0.21.0"; };
extraConfig.general.unsafe-accounts-conf = true;
};
accounts.email.accounts.example = {
address = "example@mail.invalid";
realName = "Example";
primary = true;
aerc.enable = true;
notmuch.enable = true;
maildir.path = "custom-notmuch";
};
nmt.script =
let
dir =
if (pkgs.stdenv.hostPlatform.isDarwin && !config.xdg.enable) then
"home-files/Library/Preferences/aerc"
else
"home-files/.config/aerc";
in
''
assertFileContent ${dir}/accounts.conf ${./notmuch-legacy.expected}
'';
}