syslog-ng module: Add package option
This commit is contained in:
parent
9c3c7a75d3
commit
8fc777ffd6
@ -18,7 +18,7 @@ let
|
|||||||
|
|
||||||
syslogngOptions = [
|
syslogngOptions = [
|
||||||
"--foreground"
|
"--foreground"
|
||||||
"--module-path=${concatStringsSep ":" (["${pkgs.syslogng}/lib/syslog-ng"] ++ cfg.extraModulePaths)}"
|
"--module-path=${concatStringsSep ":" (["${cfg.package}/lib/syslog-ng"] ++ cfg.extraModulePaths)}"
|
||||||
"--cfgfile=${syslogngConfig}"
|
"--cfgfile=${syslogngConfig}"
|
||||||
"--control=${ctrlSocket}"
|
"--control=${ctrlSocket}"
|
||||||
"--persist-file=${persistFile}"
|
"--persist-file=${persistFile}"
|
||||||
@ -37,6 +37,13 @@ in {
|
|||||||
Whether to enable the syslog-ng daemon.
|
Whether to enable the syslog-ng daemon.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.syslogng;
|
||||||
|
description = ''
|
||||||
|
The package providing syslog-ng binaries.
|
||||||
|
'';
|
||||||
|
};
|
||||||
serviceName = mkOption {
|
serviceName = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "syslog-ng";
|
default = "syslog-ng";
|
||||||
@ -77,7 +84,7 @@ in {
|
|||||||
Sockets = "syslog.socket";
|
Sockets = "syslog.socket";
|
||||||
StandardOutput = "null";
|
StandardOutput = "null";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
ExecStart = "${pkgs.syslogng}/sbin/syslog-ng ${concatStringsSep " " syslogngOptions}";
|
ExecStart = "${cfg.package}/sbin/syslog-ng ${concatStringsSep " " syslogngOptions}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user