home/natto: email config and misc shit

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2022-11-10 19:17:20 +05:30
parent f9723b1f11
commit 67f879cfc1
10 changed files with 224 additions and 28 deletions

69
home/natto/email.nix Normal file
View File

@@ -0,0 +1,69 @@
{ config, lib, pkgs, ... }:
let
key = "53EC089EF230E47A83BA8F8195949BD4B853F559";
host = "mail.weirdnatto.in";
in
{
accounts.email = {
accounts = {
natto = rec {
realName = "Amneesh Singh";
primary = true;
address = "natto@weirdnatto.in";
userName = address;
gpg = {
inherit key;
signByDefault = true;
};
imap = {
inherit host;
tls.enable = true;
};
imapnotify.enable = true;
smtp = {
inherit host;
tls.enable = true;
};
mbsync = {
enable = true;
create = "both";
};
passwordCommand = "pass show email/${address}";
neomutt = {
enable = true;
extraMailboxes = [
"Sent"
"Drafts"
"Trash"
"Junk"
];
};
};
};
};
programs = {
mbsync.enable = true;
neomutt = rec {
enable = true;
package = pkgs.neomutt;
sort = "reverse-date";
extraConfig =
lib.concatMapStringsSep
"\n"
builtins.readFile
[
./config/neomutt/neomuttrc
./config/neomutt/theme
];
};
};
home = {
packages = with pkgs; [ mailcap ];
file = {
mailcap = {
source = ./config/mailcap;
target = "${config.home.homeDirectory}/.mailcap";
};
};
};
}