Skip to content

Instantly share code, notes, and snippets.

@tasmo
Created November 22, 2021 10:55
Show Gist options
  • Select an option

  • Save tasmo/66edc9259a42e098dbc85815c411c3f7 to your computer and use it in GitHub Desktop.

Select an option

Save tasmo/66edc9259a42e098dbc85815c411c3f7 to your computer and use it in GitHub Desktop.

Revisions

  1. tasmo created this gist Nov 22, 2021.
    95 changes: 95 additions & 0 deletions mail.nix
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,95 @@
    { pkgs, ... }:

    {
    accounts = {
    email = {
    maildirBasePath = "Mail";

    accounts = {
    tasmo = {
    primary = true;
    realName = "Tasmo";
    userName = "tasmo@tasmo.com";
    address = "tasmo@tasmo.com";
    aliases = [
    "github@tasmo.com"
    ];
    astroid = {
    enable = true;
    sendMailCommand = "msmtpq --read-envelope-from --read-recipients";
    };
    gpg.key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    himalaya.enable = true;
    imap = {
    host = "mail.tasmo.com";
    tls.enable = true;
    };
    mbsync = {
    enable = true;
    create = "both";
    expunge = "both";
    remove = "both";
    };
    msmtp.enable = true;
    mu.enable = true;
    notmuch.enable = true;
    passwordCommand = "pass tasmo.com | sed -n '1p'";
    smtp = {
    host = "mail.tasmo.com";
    port = 587;
    tls = {
    enable = true;
    useStartTls = true;
    };
    };
    };

    Gmail = {
    flavor = "gmail.com";
    realName = "Tasmo";
    userName = "tasmo@gmail.com";
    address = "tasmo@gmail.com";
    aliases = [
    "tasmo@googlemail.com"
    ];
    astroid = {
    enable = true;
    sendMailCommand = "msmtpq --read-envelope-from --read-recipients";
    };
    gpg.key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    himalaya.enable = true;
    imap = {
    host = "imap.gmail.com";
    tls.enable = true;
    };
    mbsync = {
    enable = true;
    create = "both";
    expunge = "both";
    remove = "both";
    };
    msmtp.enable = true;
    mu.enable = true;
    notmuch.enable = true;
    passwordCommand = "pass gmail | sed -n '1p'";
    smtp = {
    host = "smtp.gmail.com";
    tls = {
    enable = true;
    useStartTls = true;
    };
    };
    };
    };
    };
    };

    programs = {
    himalaya = {
    enable = true;
    settings = {
    downloads-dir = "~/Attachments";
    };
    };
    };
    }