Signed-off-by: Christoph Schmatzler <christoph@schmatzler.com>
This commit is contained in:
2026-03-01 21:01:22 +00:00
parent 2b3db24465
commit e8f1d597e3
6 changed files with 26 additions and 172 deletions

20
profiles/mbsync.nix Normal file
View 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;
};
};
}

View File

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