alot: add structured settings

- Also support tags.

- Optionally write the hooks file.

PR #812
This commit is contained in:
Matthieu Coudron 2019-08-21 16:38:52 +09:00 committed by Robert Helgesson
parent 642d9ffe24
commit 10673bff4c
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
5 changed files with 171 additions and 13 deletions

View file

@ -0,0 +1,37 @@
# Generated by Home Manager.
# See http://alot.readthedocs.io/en/latest/configuration/config_options.html
auto_remove_unread = True
handle_mouse = True
initial_command = search tag:inbox AND NOT tag:killed
prefer_plaintext = True
[tags]
[bindings]
[[bufferlist]]
[[search]]
[[envelope]]
[[taglist]]
[[thread]]
[accounts]
[[hm@example.com]]
address=hm@example.com
draft_box=maildir:///home/hm-user/Mail/hm@example.com/Drafts
realname=H. M. Test
sendmail_command=
sent_box=maildir:///home/hm-user/Mail/hm@example.com/Sent
auto_remove_unread = True
ask_subject = False
handle_mouse = True
[[[abook]]]

View file

@ -0,0 +1,36 @@
{ config, lib, pkgs, ... }:
with lib;
{
imports = [ ../../accounts/email-test-accounts.nix ];
config = {
accounts.email.accounts = {
"hm@example.com" = {
primary = true;
notmuch.enable = true;
alot = {
contactCompletion = { };
extraConfig = ''
auto_remove_unread = True
ask_subject = False
handle_mouse = True
'';
};
imap.port = 993;
};
};
programs.alot = { enable = true; };
nixpkgs.overlays =
[ (self: super: { alot = pkgs.writeScriptBin "dummy-alot" ""; }) ];
nmt.script = ''
assertFileExists home-files/.config/alot/config
assertFileContent home-files/.config/alot/config ${./alot-expected.conf}
'';
};
}

View file

@ -0,0 +1 @@
{ alot = ./alot.nix; }