nixos/msmtp: add package option (#425532)

authored by Sandro and committed by GitHub 12094020 142d1355

+4 -2
+4 -2
nixos/modules/programs/msmtp.nix
··· 16 programs.msmtp = { 17 enable = lib.mkEnableOption "msmtp - an SMTP client"; 18 19 setSendmail = lib.mkOption { 20 type = lib.types.bool; 21 default = true; ··· 75 }; 76 77 config = lib.mkIf cfg.enable { 78 - environment.systemPackages = [ pkgs.msmtp ]; 79 80 services.mail.sendmailSetuidWrapper = lib.mkIf cfg.setSendmail { 81 program = "sendmail"; 82 - source = "${pkgs.msmtp}/bin/sendmail"; 83 setuid = false; 84 setgid = false; 85 owner = "root";
··· 16 programs.msmtp = { 17 enable = lib.mkEnableOption "msmtp - an SMTP client"; 18 19 + package = lib.mkPackageOption pkgs "msmtp" { }; 20 + 21 setSendmail = lib.mkOption { 22 type = lib.types.bool; 23 default = true; ··· 77 }; 78 79 config = lib.mkIf cfg.enable { 80 + environment.systemPackages = [ cfg.package ]; 81 82 services.mail.sendmailSetuidWrapper = lib.mkIf cfg.setSendmail { 83 program = "sendmail"; 84 + source = "${cfg.package}/bin/sendmail"; 85 setuid = false; 86 setgid = false; 87 owner = "root";