diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2018-09-16 22:53:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-16 22:53:02 +0100 |
commit | 8ceaf29f3b97399121c069e3a9699ed7d8be3618 (patch) | |
tree | 17b7204a65f53e6a207f97814115adbb9a3a06c2 /nixos/modules/services | |
parent | dd0c2cf9e1a3b1212567f69450c29d292e7ff808 (diff) | |
parent | d73ed4264f48da098e782c0e204ae4ce613801e5 (diff) | |
download | nixpkgs-8ceaf29f3b97399121c069e3a9699ed7d8be3618.tar nixpkgs-8ceaf29f3b97399121c069e3a9699ed7d8be3618.tar.gz nixpkgs-8ceaf29f3b97399121c069e3a9699ed7d8be3618.tar.bz2 nixpkgs-8ceaf29f3b97399121c069e3a9699ed7d8be3618.tar.lz nixpkgs-8ceaf29f3b97399121c069e3a9699ed7d8be3618.tar.xz nixpkgs-8ceaf29f3b97399121c069e3a9699ed7d8be3618.tar.zst nixpkgs-8ceaf29f3b97399121c069e3a9699ed7d8be3618.zip |
Merge pull request #46741 from pacien/exim-module-package-opt
exim: parametrise package
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/mail/exim.nix | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/nixos/modules/services/mail/exim.nix b/nixos/modules/services/mail/exim.nix index 06c4b2811b3..c0581129135 100644 --- a/nixos/modules/services/mail/exim.nix +++ b/nixos/modules/services/mail/exim.nix @@ -2,7 +2,7 @@ let inherit (lib) mkIf mkOption singleton types; - inherit (pkgs) coreutils exim; + inherit (pkgs) coreutils; cfg = config.services.exim; in @@ -57,6 +57,16 @@ in ''; }; + package = mkOption { + type = types.package; + default = pkgs.exim; + defaultText = "pkgs.exim"; + description = '' + The Exim derivation to use. + This can be used to enable features such as LDAP or PAM support. + ''; + }; + }; }; @@ -74,7 +84,7 @@ in spool_directory = ${cfg.spoolDir} ${cfg.config} ''; - systemPackages = [ exim ]; + systemPackages = [ cfg.package ]; }; users.users = singleton { @@ -89,14 +99,14 @@ in gid = config.ids.gids.exim; }; - security.wrappers.exim.source = "${exim}/bin/exim"; + security.wrappers.exim.source = "${cfg.package}/bin/exim"; systemd.services.exim = { description = "Exim Mail Daemon"; wantedBy = [ "multi-user.target" ]; restartTriggers = [ config.environment.etc."exim.conf".source ]; serviceConfig = { - ExecStart = "${exim}/bin/exim -bdf -q30m"; + ExecStart = "${cfg.package}/bin/exim -bdf -q30m"; ExecReload = "${coreutils}/bin/kill -HUP $MAINPID"; }; preStart = '' |