diff options
Diffstat (limited to 'modules/programs/email/default.nix')
| -rw-r--r-- | modules/programs/email/default.nix | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/modules/programs/email/default.nix b/modules/programs/email/default.nix index 36dfc95..3a57cf0 100644 --- a/modules/programs/email/default.nix +++ b/modules/programs/email/default.nix @@ -2,12 +2,11 @@ { config, lib, - pkgs, ... }: let - mailDir = "${config.home.homeDirectory}/.local/mail"; + mailDir = "${config.home.homeDirectory}/.local/share/mail"; in { options.programs.email = { @@ -15,39 +14,11 @@ in }; config = lib.mkIf config.programs.email.enable { - home.packages = [ - pkgs.mbsync - pkgs.notmuch - ]; + programs.mbsync.enable = true; + programs.notmuch.enable = true; - home.sessionVariables = { - MAILDIR = mailDir; - NOTMUCH_CONFIG = "${config.xdg.configHome}/notmuch/notmuchrc"; - }; + accounts.email.maildirBasePath = mailDir; - xdg.configFile."notmuch/notmuch.config" = { - text = '' - [database] - path=${mailDir}/.notmuch - - [user] - name= - address= - primary_key= - - [new] - tags=unclassified;new; - ignore= - - [search] - exclude_tags=deleted;spam; - - [maildir] - synchronize_flags=true - - [crypto] - gpg_path=${pkgs.gnupg}/bin/gpg - ''; - }; + home.sessionVariables.MAILDIR = mailDir; }; } |
