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:
Eliza Velasquez 2022-05-11 22:11:22 -07:00 committed by Robert Helgesson
parent 467617947d
commit d059b9448a
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
9 changed files with 397 additions and 0 deletions

View file

@ -0,0 +1,5 @@
{
mujmap-defaults = ./mujmap-defaults.nix;
mujmap-fqdn-and-session-url-specified =
./mujmap-fqdn-and-session-url-specified.nix;
}

View 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"

View 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
}
'';
};
}

View file

@ -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
}
'';
};
}