Fix borked email file management

This commit is contained in:
Nathan McCarty 2022-11-10 11:30:39 -05:00
parent 39e7a3e8c8
commit 16ee59549e
Signed by: thatonelutenist
GPG Key ID: D70DA3DD4D1E9F96
1 changed files with 14 additions and 3 deletions

View File

@ -24,6 +24,17 @@ with lib; {
};
Install = { WantedBy = [ "graphical-session.target" ]; };
};
# Setup files we need for email to work
home.file = {
".local/nathan-home/proton.pem" = {
source =
../../../certificates/protonmail-${nixosConfig.networking.hostName}.pem;
};
".local/nathan-home/sync-mu4e.sh" = {
source = ../../../scripts/update-mu4e.sh;
executable = true;
};
};
# Setup accounts
accounts.email = {
maildirBasePath = ".mail";
@ -46,7 +57,7 @@ with lib; {
tls = {
useStartTls = true;
certificatesFile =
../../../certificates/protonmail-${nixosConfig.networking.hostName}.pem;
"${config.home.homeDirectory}/.local/nathan-home/proton.pem";
};
};
smtp = {
@ -55,7 +66,7 @@ with lib; {
tls = {
useStartTls = true;
certificatesFile =
../../../certificates/protonmail-${nixosConfig.networking.hostName}.pem;
"${config.home.homeDirectory}/.local/nathan-home/proton.pem";
};
};
mbsync = {
@ -77,7 +88,7 @@ with lib; {
# Index manually with mu if we don't have emacs setup, but if we have the emacs service setup,
# run through emacsclient, as it will have the lock
postExec = if config.nathan.programs.emacs.service then
"${../../../scripts/update-mu4e.sh}"
"${config.home.homeDirectory}/.local/nathan-home/sync-mu4e.sh"
else
"${
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.mu