mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-10 01:33:11 +01:00
nixos/msmtp: add package option
This commit is contained in:
parent
aa7ef564b3
commit
22665bce7a
|
|
@ -16,6 +16,8 @@ in
|
|||
programs.msmtp = {
|
||||
enable = lib.mkEnableOption "msmtp - an SMTP client";
|
||||
|
||||
package = lib.mkPackageOption pkgs "msmtp" { };
|
||||
|
||||
setSendmail = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
|
|
@ -75,11 +77,11 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.msmtp ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
services.mail.sendmailSetuidWrapper = lib.mkIf cfg.setSendmail {
|
||||
program = "sendmail";
|
||||
source = "${pkgs.msmtp}/bin/sendmail";
|
||||
source = "${cfg.package}/bin/sendmail";
|
||||
setuid = false;
|
||||
setgid = false;
|
||||
owner = "root";
|
||||
|
|
|
|||
Loading…
Reference in a new issue