9 cfg = config.services.saslauthd;
19 services.saslauthd = {
21 enable = lib.mkEnableOption "saslauthd, the Cyrus SASL authentication daemon";
23 package = lib.mkPackageOption pkgs [ "cyrus_sasl" "bin" ] { };
25 mechanism = lib.mkOption {
28 description = "Auth mechanism to use";
31 config = lib.mkOption {
32 type = lib.types.lines;
34 description = "Configuration to use for Cyrus SASL authentication daemon.";
43 config = lib.mkIf cfg.enable {
45 systemd.services.saslauthd = {
46 description = "Cyrus SASL authentication daemon";
48 wantedBy = [ "multi-user.target" ];
51 ExecStart = "@${cfg.package}/sbin/saslauthd saslauthd -a ${cfg.mechanism} -O ${pkgs.writeText "saslauthd.conf" cfg.config}";
53 PIDFile = "/run/saslauthd/saslauthd.pid";