1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-10 21:29:48 +01:00

msmtp: add configurable package

This commit is contained in:
Brian Leung 2023-12-12 14:40:52 -08:00 committed by Mikilio
parent 472b4ef941
commit 8b3fb94f60
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F

View file

@ -51,6 +51,13 @@ in {
programs.msmtp = {
enable = mkEnableOption "msmtp";
package = mkOption {
type = types.package;
default = pkgs.msmtp;
defaultText = literalExpression "pkgs.msmtp";
description = "The msmtp package to use.";
};
extraConfig = mkOption {
type = types.lines;
default = "";
@ -81,7 +88,7 @@ in {
};
config = mkIf cfg.enable {
home.packages = [ pkgs.msmtp ];
home.packages = [ cfg.package ];
xdg.configFile."msmtp/config".text = configFile msmtpAccounts;