1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 02:39:48 +01:00

msmtp: add extraConfig account option

This patch allow to define custom msmtp options per email account. For
example: to change the "auth" method from "on" to "login", add
`msmtp.extraConfig.auth="login"`.
This commit is contained in:
David Guibert 2018-12-12 14:28:33 +01:00 committed by Robert Helgesson
parent 9052131aef
commit a7affc93ba
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
2 changed files with 12 additions and 0 deletions

View file

@ -21,5 +21,16 @@ with lib;
primary account will be used.
'';
};
extraConfig = mkOption {
type = types.attrsOf types.str;
default = { };
example = { auth = "login"; };
description = ''
Extra configuration options to add to <filename>~/.msmtprc</filename>.
See <link xlink:href="https://marlam.de/msmtp/msmtprc.txt"/> for
examples.
'';
};
};
}

View file

@ -31,6 +31,7 @@ let
# msmtp requires the password to finish with a newline.
passwordeval = ''${pkgs.bash}/bin/bash -c "${toString passwordCommand}; echo"'';
}
// msmtp.extraConfig
)
++ optional primary "\naccount default : ${name}"
);