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:
parent
9052131aef
commit
a7affc93ba
2 changed files with 12 additions and 0 deletions
|
@ -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.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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}"
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue