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.
31 lines
949 B
Nix
31 lines
949 B
Nix
{ lib, options, ... }:
|
|
{
|
|
imports = [
|
|
{
|
|
programs.notmuch.new.ignore = [ "ordinary" ];
|
|
}
|
|
];
|
|
|
|
programs.mbsync.enable = true;
|
|
programs.lieer.enable = true;
|
|
programs.mujmap.enable = true;
|
|
programs.notmuch = {
|
|
enable = true;
|
|
new.ignore = lib.mkForce [ "private" ];
|
|
extraConfig.user = {
|
|
name = "Sync User";
|
|
primary_email = "sync@example.com";
|
|
};
|
|
settings.new.ignore = lib.mkIf false [ "unused" ];
|
|
};
|
|
|
|
test.asserts.warnings.expected = [
|
|
"The option `programs.notmuch.extraConfig' defined in ${lib.showFiles options.programs.notmuch.extraConfig.files} has been renamed to `programs.notmuch.settings'."
|
|
"The option `programs.notmuch.new.ignore' defined in ${lib.showFiles options.programs.notmuch.new.ignore.files} has been renamed to `programs.notmuch.settings.new.ignore'."
|
|
];
|
|
|
|
nmt.script = ''
|
|
assertFileRegex home-files/.config/notmuch/default/config '^ignore=private$'
|
|
'';
|
|
}
|