From 16ee59549e0c61edc1c7f6ef1b4e132af0445450 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Thu, 10 Nov 2022 11:30:39 -0500 Subject: [PATCH] Fix borked email file management --- home-manager/linux/services/email.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/home-manager/linux/services/email.nix b/home-manager/linux/services/email.nix index b4aac80..64449e3 100644 --- a/home-manager/linux/services/email.nix +++ b/home-manager/linux/services/email.nix @@ -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