alot: add structured settings
- Also support tags. - Optionally write the hooks file. PR #812
This commit is contained in:
parent
642d9ffe24
commit
10673bff4c
5 changed files with 171 additions and 13 deletions
37
tests/modules/programs/alot/alot-expected.conf
Normal file
37
tests/modules/programs/alot/alot-expected.conf
Normal 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]]]
|
||||
36
tests/modules/programs/alot/alot.nix
Normal file
36
tests/modules/programs/alot/alot.nix
Normal 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}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
1
tests/modules/programs/alot/default.nix
Normal file
1
tests/modules/programs/alot/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ alot = ./alot.nix; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue