mujmap: add module
mujmap is a tool that synchronizes mail between a mail server and notmuch via JMAP. It's very similar to lieer, so I heavily based the implementation of the notmuch module on lieer's. I did not include an equivalent to lieer's periodic synchronization service, however, because I plan to soon introduce a daemon mode to mujmap. https://github.com/elizagamedev/mujmap
This commit is contained in:
parent
467617947d
commit
d059b9448a
9 changed files with 397 additions and 0 deletions
5
tests/modules/programs/mujmap/default.nix
Normal file
5
tests/modules/programs/mujmap/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
mujmap-defaults = ./mujmap-defaults.nix;
|
||||
mujmap-fqdn-and-session-url-specified =
|
||||
./mujmap-fqdn-and-session-url-specified.nix;
|
||||
}
|
||||
14
tests/modules/programs/mujmap/mujmap-defaults-expected.toml
Normal file
14
tests/modules/programs/mujmap/mujmap-defaults-expected.toml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
auto_create_new_mailboxes = true
|
||||
fqdn = "example.com"
|
||||
password_command = "'password-command'"
|
||||
username = "home.manager"
|
||||
|
||||
[tags]
|
||||
deleted = "deleted"
|
||||
directory_separator = "/"
|
||||
important = "important"
|
||||
inbox = "inbox"
|
||||
lowercase = false
|
||||
phishing = "phishing"
|
||||
sent = "sent"
|
||||
spam = "spam"
|
||||
25
tests/modules/programs/mujmap/mujmap-defaults.nix
Normal file
25
tests/modules/programs/mujmap/mujmap-defaults.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||
|
||||
config = {
|
||||
programs.mujmap.enable = true;
|
||||
programs.mujmap.package = config.lib.test.mkStubPackage { };
|
||||
|
||||
accounts.email.accounts."hm@example.com" = {
|
||||
jmap.host = "example.com";
|
||||
mujmap.enable = true;
|
||||
notmuch.enable = true;
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/Mail/hm@example.com/mujmap.toml
|
||||
assertFileContent home-files/Mail/hm@example.com/mujmap.toml ${
|
||||
./mujmap-defaults-expected.toml
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||
|
||||
config = {
|
||||
programs.mujmap.enable = true;
|
||||
programs.mujmap.package = config.lib.test.mkStubPackage { };
|
||||
|
||||
accounts.email.accounts."hm@example.com" = {
|
||||
jmap.host = "example.com";
|
||||
jmap.sessionUrl = "https://jmap.example.com/";
|
||||
mujmap.enable = true;
|
||||
notmuch.enable = true;
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/Mail/hm@example.com/mujmap.toml
|
||||
assertFileContent home-files/Mail/hm@example.com/mujmap.toml ${
|
||||
./mujmap-defaults-expected.toml
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue