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