20
profiles/mbsync.nix
Normal file
20
profiles/mbsync.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{...}: {
|
||||
programs.mbsync.enable = true;
|
||||
services.mbsync = {
|
||||
enable = true;
|
||||
frequency = "*:0/5";
|
||||
};
|
||||
|
||||
accounts.email.accounts."christoph@schmatzler.com" = {
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "both";
|
||||
expunge = "both";
|
||||
};
|
||||
imap = {
|
||||
host = "imap.mail.me.com";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
tomlFormat = pkgs.formats.toml {};
|
||||
account = config.accounts.email.accounts."christoph@schmatzler.com";
|
||||
maildirPath = account.maildir.absPath;
|
||||
in {
|
||||
home.packages = [pkgs.neverest];
|
||||
|
||||
xdg.configFile."neverest/config.toml".source =
|
||||
tomlFormat.generate "neverest-config.toml" {
|
||||
accounts."christoph@schmatzler.com" = {
|
||||
default = true;
|
||||
|
||||
folder.filters = "all";
|
||||
|
||||
left = {
|
||||
backend = {
|
||||
type = "maildir";
|
||||
root-dir = maildirPath;
|
||||
};
|
||||
folder = {
|
||||
aliases = {
|
||||
inbox = "INBOX";
|
||||
drafts = "Drafts";
|
||||
sent = "Sent Messages";
|
||||
trash = "Deleted Messages";
|
||||
};
|
||||
permissions = {
|
||||
create = true;
|
||||
delete = true;
|
||||
};
|
||||
};
|
||||
flag.permissions.update = true;
|
||||
message.permissions = {
|
||||
create = true;
|
||||
delete = true;
|
||||
};
|
||||
};
|
||||
|
||||
right = {
|
||||
backend = {
|
||||
type = "imap";
|
||||
host = "imap.mail.me.com";
|
||||
port = 993;
|
||||
encryption = "tls";
|
||||
login = account.userName;
|
||||
auth = {
|
||||
type = "password";
|
||||
cmd = concatStringsSep " " account.passwordCommand;
|
||||
};
|
||||
clients-pool-size = 8;
|
||||
};
|
||||
folder = {
|
||||
aliases = {
|
||||
inbox = "INBOX";
|
||||
drafts = "Drafts";
|
||||
sent = "Sent Messages";
|
||||
trash = "Deleted Messages";
|
||||
};
|
||||
permissions.delete = false;
|
||||
};
|
||||
message.permissions.delete = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user