diff options
Diffstat (limited to 'modules/home/mu.nix')
-rw-r--r-- | modules/home/mu.nix | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/modules/home/mu.nix b/modules/home/mu.nix new file mode 100644 index 0000000..1a22963 --- /dev/null +++ b/modules/home/mu.nix @@ -0,0 +1,66 @@ +{ config, lib, ...}: with lib; let + cfg = config.santi-modules; +in { + options.santi-modules.mu.enable = mkEnableOption "Enables mu, mbsync and msmtp"; + config = mkIf cfg.mu.enable { + home-manager.users.leonardo = { + programs = { + mu.enable = true; + msmtp.enable = true; + mbsync.enable = true; + }; + services.mbsync = { + enable = true; + frequency = "*:0/5"; + }; + accounts.email.accounts = { + personal = { + address = "[email protected]"; + userName = "[email protected]"; + imap.host = "imap.gmail.com"; + smtp.host = "smtp.gmail.com"; + primary = true; + realName = "Leonardo Ribeiro Santiago"; + mbsync = { + enable = true; + create = "both"; + expunge = "both"; + }; + msmtp.enable = true; + mu.enable = true; + passwordCommand = "cat ${config.age.secrets.personal-mail.path}"; + }; + university = { + address = "[email protected]"; + userName = "[email protected]"; + imap.host = "imap.gmail.com"; + smtp.host = "smtp.gmail.com"; + realName = "Leonardo Ribeiro Santiago"; + mbsync = { + enable = true; + create = "both"; + expunge = "both"; + }; + msmtp.enable = true; + mu.enable = true; + passwordCommand = "cat ${config.age.secrets.university-mail.path}"; + }; + work = { + address = "[email protected]"; + userName = "[email protected]"; + imap.host = "imap.gmail.com"; + smtp.host = "smtp.gmail.com"; + realName = "Leonardo Ribeiro Santiago"; + mbsync = { + enable = true; + create = "both"; + expunge = "both"; + }; + msmtp.enable = true; + mu.enable = true; + passwordCommand = "cat ${config.age.secrets.work-mail.path}"; + }; + }; + }; + }; +} |