diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-09 20:34:00 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-09 20:34:00 +0530 |
| commit | ee32d0d0813f9870d89fb7d821633fd8b4a9987a (patch) | |
| tree | 97ea433469377daee6f9651f10a0a7a21be95d75 /modules/private | |
| parent | e2ae84d1c8ab00021127d455e549a47af9bc3291 (diff) | |
| download | home-manager-config-ee32d0d0813f9870d89fb7d821633fd8b4a9987a.tar.gz home-manager-config-ee32d0d0813f9870d89fb7d821633fd8b4a9987a.zip | |
feat: added email configuration with mbsync + notmuch
added a private module which will be gitignored and serves to include options that are not meant to be shared
Diffstat (limited to 'modules/private')
| -rw-r--r-- | modules/private/default.example.nix | 11 | ||||
| -rw-r--r-- | modules/private/email.example.nix | 43 | ||||
| -rw-r--r-- | modules/private/git.example.nix | 8 |
3 files changed, 62 insertions, 0 deletions
diff --git a/modules/private/default.example.nix b/modules/private/default.example.nix new file mode 100644 index 0000000..e5b1a84 --- /dev/null +++ b/modules/private/default.example.nix @@ -0,0 +1,11 @@ +{ config, ... }: + +{ + # This file is a template for modules/private/default.nix + # Copy to modules/private/default.nix and fill in your secrets. + + imports = [ + ./git.nix + ./email.nix + ]; +} diff --git a/modules/private/email.example.nix b/modules/private/email.example.nix new file mode 100644 index 0000000..ae3b475 --- /dev/null +++ b/modules/private/email.example.nix @@ -0,0 +1,43 @@ +{ config, ... }: + +let + mailDir = "${config.home.homeDirectory}/.local/mail"; +in +{ + accounts.email.accounts = { + "example" = { + realName = "Example User"; + address = "user@example.com"; + userName = "user@example.com"; + passwordCommand = "${config.programs.gopass.package}/bin/gopass show -o mail/example"; + flavor = "gmail.com"; + + mbsync = { + enable = true; + createMailbox = true; + extraConfig.channel = { + Patterns = "*"; + SyncState = "*"; + }; + }; + + notmuch.enable = true; + + mu.enable = false; + msmtp.enable = false; + imapnotify.enable = false; + }; + }; + + # Mbsync config + programs.mbsync = { + enable = true; + directory = mailDir; + }; + + # Notmuch config + programs.notmuch = { + enable = true; + database.path = "${mailDir}/.notmuch"; + }; +} diff --git a/modules/private/git.example.nix b/modules/private/git.example.nix new file mode 100644 index 0000000..888c769 --- /dev/null +++ b/modules/private/git.example.nix @@ -0,0 +1,8 @@ +{ config, ... }: + +{ + programs.git.signing = { + key = "EXAMPLE_GPG_KEY_ID"; + signByDefault = true; + }; +} |
