mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-02 19:49:18 +00:00
Add programs.notmuch.settings for native INI configuration with list values, and generate the configuration file from it. The new.ignore, new.tags, maildir.synchronizeFlags, search.excludeTags, and extraConfig options become deprecated aliases into settings. Settings carry no static defaults: new.tags, new.ignore, and maildir.synchronize_flags fall back to notmuch's identical defaults. State versions before 26.11 keep search.exclude_tags = deleted;spam and write database.path even without email accounts. Enabled email accounts supply database.path, and notmuch-enabled accounts the user identity. Null values and empty sections are omitted so a derived value can be removed. extraConfig no longer overwrites modeled values unconditionally: forced definitions win and ordinary collisions fail. The release notes describe the migration. Mbsync, lieer, and mujmap now write settings.new.ignore directly, so they do not trigger deprecation warnings.
35 lines
1.0 KiB
Nix
35 lines
1.0 KiB
Nix
{ lib, ... }:
|
|
{
|
|
imports = [
|
|
../../accounts/email-test-accounts.nix
|
|
{
|
|
programs.notmuch.settings = {
|
|
user.name = "Discarded Name";
|
|
new.tags = [ "discarded" ];
|
|
custom.discarded = true;
|
|
};
|
|
}
|
|
];
|
|
|
|
programs.notmuch = {
|
|
enable = true;
|
|
settings = lib.mkForce {
|
|
user.name = "Forced Name";
|
|
user.primary_email = "forced@example.com";
|
|
new.ignore = [ ];
|
|
};
|
|
};
|
|
|
|
test.asserts.warnings.expected = [ ];
|
|
|
|
nmt.script = ''
|
|
assertFileRegex home-files/.config/notmuch/default/config '^name=Forced Name$'
|
|
assertFileRegex home-files/.config/notmuch/default/config '^primary_email=forced@example.com$'
|
|
assertFileRegex home-files/.config/notmuch/default/config '^ignore=$'
|
|
assertFileNotRegex home-files/.config/notmuch/default/config '^tags='
|
|
assertFileNotRegex home-files/.config/notmuch/default/config '^discarded='
|
|
assertFileNotRegex home-files/.config/notmuch/default/config '^path='
|
|
assertFileNotRegex home-files/.config/notmuch/default/config '^exclude_tags='
|
|
'';
|
|
}
|