1 { config, lib, pkgs, ... }:
7 cfg = config.services.saslauthd;
17 services.saslauthd = {
19 enable = mkEnableOption "saslauthd, the Cyrus SASL authentication daemon";
21 package = mkPackageOption pkgs [ "cyrus_sasl" "bin" ] { };
23 mechanism = mkOption {
26 description = "Auth mechanism to use";
32 description = "Configuration to use for Cyrus SASL authentication daemon.";
42 config = mkIf cfg.enable {
44 systemd.services.saslauthd = {
45 description = "Cyrus SASL authentication daemon";
47 wantedBy = [ "multi-user.target" ];
50 ExecStart = "@${cfg.package}/sbin/saslauthd saslauthd -a ${cfg.mechanism} -O ${pkgs.writeText "saslauthd.conf" cfg.config}";
52 PIDFile = "/run/saslauthd/saslauthd.pid";