feat(home): add email module for personal email setup
This commit is contained in:
parent
326e3e3c61
commit
8d306915d9
2 changed files with 46 additions and 27 deletions
46
homes/x86_64-linux/rafiq/cli/email.nix
Normal file
46
homes/x86_64-linux/rafiq/cli/email.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ osConfig, lib, ... }:
|
||||
let
|
||||
mkEmailAccount = address: {
|
||||
inherit address;
|
||||
maildir.path = address;
|
||||
userName = address;
|
||||
realName = "Mohammad Rafiq";
|
||||
passwordCommand = "sudo cat ${osConfig.sops.secrets."rafiq/personalEmailPassword".path}";
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "both";
|
||||
};
|
||||
imap = {
|
||||
host = "imap.forwardemail.net";
|
||||
port = 993;
|
||||
};
|
||||
smtp = {
|
||||
host = "smtp.forwardemail.net";
|
||||
port = 465;
|
||||
};
|
||||
thunderbird.enable = osConfig.desktop.enable;
|
||||
neomutt.enable = true;
|
||||
neomutt.mailboxType = "imap";
|
||||
himalaya.enable = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.himalaya.enable = true;
|
||||
programs.neomutt = {
|
||||
enable = true;
|
||||
vimKeys = true;
|
||||
};
|
||||
persistDirs = [
|
||||
"mail/rafiq@rrv.sh"
|
||||
"mail/mohammadrafiq@rrv.sh"
|
||||
];
|
||||
accounts.email = {
|
||||
maildirBasePath = "mail";
|
||||
accounts = {
|
||||
"rafiq@rrv.sh" = mkEmailAccount "rafiq@rrv.sh" // {
|
||||
primary = true;
|
||||
};
|
||||
"mohammadrafiq@rrv.sh" = mkEmailAccount "mohammadrafiq@rrv.sh";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -7,22 +7,6 @@
|
|||
let
|
||||
inherit (lib) singleton optional;
|
||||
inherit (inputs) import-tree;
|
||||
mkEmailAccount = address: {
|
||||
inherit address;
|
||||
maildir.path = address;
|
||||
userName = address;
|
||||
realName = "Mohammad Rafiq";
|
||||
passwordCommand = "sudo cat ${osConfig.sops.secrets."rafiq/personalEmailPassword".path}";
|
||||
imap = {
|
||||
host = "imap.forwardemail.net";
|
||||
port = 993;
|
||||
};
|
||||
smtp = {
|
||||
host = "smtp.forwardemail.net";
|
||||
port = 465;
|
||||
};
|
||||
thunderbird.enable = osConfig.desktop.enable;
|
||||
};
|
||||
in
|
||||
{
|
||||
imports =
|
||||
|
@ -31,16 +15,5 @@ in
|
|||
|
||||
config = {
|
||||
stylix.image = ./desktop/wallpaper.png;
|
||||
accounts = {
|
||||
email = {
|
||||
maildirBasePath = "mail";
|
||||
accounts = {
|
||||
"rafiq@rrv.sh" = {
|
||||
primary = true;
|
||||
} // mkEmailAccount "rafiq@rrv.sh";
|
||||
"mohammadrafiq@rrv.sh" = mkEmailAccount "mohammadrafiq@rrv.sh";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue