From 2cf429ec1d636c80f497a534c841310d57c809f1 Mon Sep 17 00:00:00 2001 From: Alexandre LUCAZEAU Date: Fri, 17 Dec 2021 15:12:33 +0100 Subject: [PATCH] ADD : mails.nix - conf for mbsync/notmuch/msmtp --- .mbsyncrc | 27 ++++++++++++++++++++++++++ nixpkgs/home.nix | 1 + nixpkgs/mails.nix | 46 ++++++++++++++++++++++++++++++++++++++++++++ nixpkgs/packages.nix | 2 +- 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 .mbsyncrc create mode 100644 nixpkgs/mails.nix diff --git a/.mbsyncrc b/.mbsyncrc new file mode 100644 index 0000000..06b19ba --- /dev/null +++ b/.mbsyncrc @@ -0,0 +1,27 @@ +IMAPAccount DRI +Host imap.dri.fr +User 1847_alexandre +PassCmd "gpg --quiet --for-your-eyes-only --no-tty --decrypt ~/.password-store/mails.gpg" +SSLType None + +IMAPStore DRI-remote +Account DRI + +MaildirStore DRI-local +Subfolders Verbatim +Path ~/Mails/DRI/ +Inbox ~/Mails/DRI/INBOX + +Channel DRI-inbox +Master :DRI-remote: +Slave :DRI-local: +Patterns * +Sync All +SyncState * +Create Both + +Channel DRI-archives +Master :DRI-local:archives +Slave :DRI-remote:"INBOX/archives" +Patterns * +Sync All diff --git a/nixpkgs/home.nix b/nixpkgs/home.nix index 77344c0..b47b92a 100644 --- a/nixpkgs/home.nix +++ b/nixpkgs/home.nix @@ -4,6 +4,7 @@ ./gnupg.nix ./git.nix ./variables.nix + ./mails.nix ]; home.keyboard = { layout = "fr"; diff --git a/nixpkgs/mails.nix b/nixpkgs/mails.nix new file mode 100644 index 0000000..d1286f1 --- /dev/null +++ b/nixpkgs/mails.nix @@ -0,0 +1,46 @@ +{ pkgs, ... }: +{ + programs.mbsync.enable = true; + programs.msmtp.enable = true; + programs.notmuch = { + enable = true; + hooks = { + preNew = "mbsync --all"; + }; + }; + accounts.email = { + accounts.dri = { + address = "alexandre@dri.fr"; + gpg = { + key = "464CAA7A718D4CE84F03DFFE8B2EB421411BF613"; + signByDefault = true ; + }; + imap = { + host = "imap.dri.fr"; + tls = { + enable = false; + }; + }; + mbsync = { + enable = true; + create = "maildir"; + + }; + msmtp.enable = true; + notmuch.enable = true; + primary = true; + realName = "LUCAZEAU Alexandre"; + userName = "1847_alexandre"; + signature = { + text = '' + Avant Vente + ''; + showsignature = "append"; + }; + passwordCommand = "gpg --quiet --for-your-eyes-only --no-tty --decrypt ~/.password-store/mails.gpg"; + smtp = { + host = "smtp.dri.fr"; + }; + }; + }; +} diff --git a/nixpkgs/packages.nix b/nixpkgs/packages.nix index 8f16d5b..1bc97b6 100644 --- a/nixpkgs/packages.nix +++ b/nixpkgs/packages.nix @@ -9,7 +9,7 @@ neomutt alacritty notmuch - #isync + isync zathura rofi pdfarranger