Configure email client
This commit is contained in:
parent
fbbee3a200
commit
d8e0210c30
|
@ -26,7 +26,9 @@ outputs = { self,
|
||||||
let
|
let
|
||||||
username = "kiana";
|
username = "kiana";
|
||||||
fullname = "Kiana Sheibani";
|
fullname = "Kiana Sheibani";
|
||||||
moduleArgs = { inherit username fullname; } // inputs;
|
email = "kiana.a.sheibani@gmail.com";
|
||||||
|
|
||||||
|
moduleArgs = { inherit username fullname email; } // inputs;
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ config, pkgs, username, fullname, ... }:
|
{ config, pkgs, username, fullname, email, ... }:
|
||||||
{
|
{
|
||||||
home.username = username;
|
home.username = username;
|
||||||
home.homeDirectory = "/home/" + username;
|
home.homeDirectory = "/home/" + username;
|
||||||
|
|
||||||
home.stateVersion = "21.11";
|
home.stateVersion = "21.11";
|
||||||
|
|
||||||
imports = [ ./shell ./wayland ];
|
imports = [ ./shell ./wayland ./email.nix ];
|
||||||
|
|
||||||
xdg.enable = true;
|
xdg.enable = true;
|
||||||
xdg.userDirs.enable = true;
|
xdg.userDirs.enable = true;
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = fullname;
|
userName = fullname;
|
||||||
userEmail = "kiana.a.sheibani@gmail.com";
|
userEmail = email;
|
||||||
|
|
||||||
signing.key = "6CB106C25E86A9F7";
|
signing.key = "6CB106C25E86A9F7";
|
||||||
signing.signByDefault = true;
|
signing.signByDefault = true;
|
||||||
|
|
37
home-manager/email.nix
Normal file
37
home-manager/email.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{ pkgs, fullname, email, ... }:
|
||||||
|
let
|
||||||
|
maildir = "/home/kiana/.mail";
|
||||||
|
in {
|
||||||
|
accounts.email = {
|
||||||
|
maildirBasePath = maildir;
|
||||||
|
accounts = {
|
||||||
|
Gmail = {
|
||||||
|
address = email;
|
||||||
|
userName = email;
|
||||||
|
flavor = "gmail.com";
|
||||||
|
primary = true;
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "both";
|
||||||
|
expunge = "both";
|
||||||
|
patterns = [ "*" ];
|
||||||
|
};
|
||||||
|
realName = fullname;
|
||||||
|
msmtp.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
msmtp.enable = true;
|
||||||
|
mbsync.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
preExec = "${pkgs.isync}/bin/mbsync -Ha";
|
||||||
|
postExec = "${pkgs.mu}/bin/mu index -m ${maildir}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue