Properly use mu from nixos-unstable

This commit is contained in:
Nathan McCarty 2022-11-09 21:20:33 -05:00
parent 4d2cbb06ce
commit c4184fe94d
Signed by: thatonelutenist
GPG Key ID: D70DA3DD4D1E9F96
1 changed files with 9 additions and 6 deletions

View File

@ -1,9 +1,13 @@
{ config, nixosConfig, lib, pkgs, ... }:
{ config, nixosConfig, lib, pkgs, inputs, ... }:
with lib; {
config = mkIf config.nathan.services.email.enable {
# Packages used for mbsync + mu + protonmail-bridge
home.packages = with pkgs; [ pass protonmail-bridge mu ];
home.packages = with pkgs; [
pass
protonmail-bridge
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.mu
];
# Configure protonmail as a service
systemd.user.services.protonmail-bridge = {
Unit = {
@ -59,7 +63,6 @@ with lib; {
create = "maildir";
remove = "both";
};
mu.enable = true;
msmtp = { enable = true; };
};
};
@ -76,10 +79,10 @@ with lib; {
postExec = if config.nathan.programs.emacs.service then
"${../../../scripts/update-mu4e.sh}"
else
"${pkgs.mu}/bin/mu index";
"${
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.mu
}/bin/mu index";
};
# Setup mu for indexing emails
programs.mu = { enable = true; };
# Setup msmtp for outbound emails
programs.msmtp = { enable = true; };
};