himalaya: adjust module for 0.8.X (#4093)
Added notmuch support, and adjust password commands configuration.
This commit is contained in:
parent
9a76fb9a85
commit
9ce6977fe7
8 changed files with 98 additions and 21 deletions
|
|
@ -3,16 +3,16 @@ backend = "imap"
|
|||
default = true
|
||||
display-name = "H. M. Test"
|
||||
email = "hm@example.com"
|
||||
imap-auth = "passwd"
|
||||
imap-host = "imap.example.com"
|
||||
imap-login = "home.manager"
|
||||
imap-passwd-cmd = "password-command"
|
||||
imap-port = 993
|
||||
imap-ssl = true
|
||||
imap-starttls = false
|
||||
sender = "smtp"
|
||||
smtp-auth = "passwd"
|
||||
smtp-host = "smtp.example.com"
|
||||
smtp-login = "home.manager"
|
||||
smtp-passwd-cmd = "password-command"
|
||||
smtp-port = 465
|
||||
smtp-ssl = true
|
||||
smtp-starttls = false
|
||||
|
|
@ -22,3 +22,9 @@ drafts = "Drafts"
|
|||
inbox = "Inbox"
|
||||
sent = "Sent"
|
||||
trash = "Trash"
|
||||
|
||||
["hm@example.com".imap-passwd]
|
||||
cmd = "password-command"
|
||||
|
||||
["hm@example.com".smtp-passwd]
|
||||
cmd = "password-command"
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ with lib;
|
|||
imap.port = 993;
|
||||
smtp.port = 465;
|
||||
himalaya.enable = true;
|
||||
himalaya.backend = "deprecated";
|
||||
himalaya.sender = "deprecated";
|
||||
himalaya.backend = test.asserts.warnings.expected;
|
||||
himalaya.sender = test.asserts.warnings.expected;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2,4 +2,5 @@
|
|||
himalaya-basic = ./basic.nix;
|
||||
himalaya-imap-smtp = ./imap-smtp.nix;
|
||||
himalaya-maildir-sendmail = ./maildir-sendmail.nix;
|
||||
himalaya-notmuch-sendmail = ./notmuch-sendmail.nix;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,16 +7,16 @@ display-name = "H. M. Test"
|
|||
email = "hm@example.com"
|
||||
email-listing-page-size = 50
|
||||
folder-listing-page-size = 50
|
||||
imap-auth = "passwd"
|
||||
imap-host = "imap.example.com"
|
||||
imap-login = "home.manager"
|
||||
imap-passwd-cmd = "password-command"
|
||||
imap-port = 143
|
||||
imap-ssl = false
|
||||
imap-starttls = false
|
||||
sender = "smtp"
|
||||
smtp-auth = "passwd"
|
||||
smtp-host = "smtp.example.com"
|
||||
smtp-login = "home.manager"
|
||||
smtp-passwd-cmd = "password-command"
|
||||
smtp-port = 465
|
||||
smtp-ssl = true
|
||||
smtp-starttls = true
|
||||
|
|
@ -27,3 +27,9 @@ drafts = "D"
|
|||
inbox = "In2"
|
||||
sent = "Out"
|
||||
trash = "Trash"
|
||||
|
||||
["hm@example.com".imap-passwd]
|
||||
cmd = "password-command"
|
||||
|
||||
["hm@example.com".smtp-passwd]
|
||||
cmd = "password-command"
|
||||
|
|
|
|||
|
|
@ -11,12 +11,10 @@ with lib;
|
|||
realName = "H. M. Test";
|
||||
passwordCommand = "password-command";
|
||||
folders = { trash = "Deleted"; };
|
||||
msmtp.enable = true;
|
||||
himalaya = {
|
||||
enable = true;
|
||||
settings = {
|
||||
sender = "sendmail";
|
||||
sendmail-cmd = "msmtp";
|
||||
};
|
||||
settings = { sendmail-cmd = "msmtp"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
email-listing-page-size = 50
|
||||
|
||||
["hm@example.com"]
|
||||
backend = "notmuch"
|
||||
default = true
|
||||
display-name = "H. M. Test"
|
||||
email = "hm@example.com"
|
||||
notmuch-db-path = "/home/hm-user/Maildir/hm@example.com"
|
||||
sender = "sendmail"
|
||||
sendmail-cmd = "msmtp"
|
||||
|
||||
["hm@example.com".folder-aliases]
|
||||
drafts = "Drafts"
|
||||
inbox = "Inbox"
|
||||
sent = "Sent"
|
||||
trash = "Deleted"
|
||||
36
tests/modules/programs/himalaya/notmuch-sendmail.nix
Normal file
36
tests/modules/programs/himalaya/notmuch-sendmail.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
accounts.email.accounts = {
|
||||
"hm@example.com" = {
|
||||
primary = true;
|
||||
address = "hm@example.com";
|
||||
userName = "home.manager";
|
||||
realName = "H. M. Test";
|
||||
passwordCommand = "password-command";
|
||||
folders = { trash = "Deleted"; };
|
||||
notmuch.enable = true;
|
||||
msmtp.enable = true;
|
||||
himalaya = {
|
||||
enable = true;
|
||||
settings = { sendmail-cmd = "msmtp"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.himalaya = {
|
||||
enable = true;
|
||||
settings = { email-listing-page-size = 50; };
|
||||
};
|
||||
|
||||
test.stubs.himalaya = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/himalaya/config.toml
|
||||
assertFileContent home-files/.config/himalaya/config.toml ${
|
||||
./notmuch-sendmail-expected.toml
|
||||
}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue