2 Mail configurations
Robin Stumm edited this page 2020-09-08 11:26:27 +02:00

msmtp error: "account default was already defined in this file"

This error happens when using msmtp with several accounts. Error was solved upstream https://gitlab.marlam.de/marlam/msmtp/issues/26#note_202. You can add to your overlay while waiting for the fix to reach nixpkgs:

msmtp = super.msmtp.overrideAttrs(oa: {
  buildInputs = [ super.pkgs.texinfo ];

  src = builtins.fetchurl {
    url = "https://gitlab.marlam.de/marlam/msmtp/repository/archive.tar.gz?ref=9f9948732a0153a54f7324873fdb5cafbcd9d2d6"; 
    sha256 = "1b0062h1ik5i78wv26vmfsgk4bl434dlci62l6pz148hvw6nkpjp";
  };
});

how to have mbsync automatically update notmuch

Wrap the mbsync executable

programs.mbsync = {
  enable = true;
  package = pkgs.writeShellScriptBin "mbsync" ''
    ${pkgs.isync}/bin/mbsync $@
    notmuch new
  '';
};