mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
syslog-ng module: Add package option
This commit is contained in:
parent
9c3c7a75d3
commit
8fc777ffd6
@ -18,7 +18,7 @@ let
|
||||
|
||||
syslogngOptions = [
|
||||
"--foreground"
|
||||
"--module-path=${concatStringsSep ":" (["${pkgs.syslogng}/lib/syslog-ng"] ++ cfg.extraModulePaths)}"
|
||||
"--module-path=${concatStringsSep ":" (["${cfg.package}/lib/syslog-ng"] ++ cfg.extraModulePaths)}"
|
||||
"--cfgfile=${syslogngConfig}"
|
||||
"--control=${ctrlSocket}"
|
||||
"--persist-file=${persistFile}"
|
||||
@ -37,6 +37,13 @@ in {
|
||||
Whether to enable the syslog-ng daemon.
|
||||
'';
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.syslogng;
|
||||
description = ''
|
||||
The package providing syslog-ng binaries.
|
||||
'';
|
||||
};
|
||||
serviceName = mkOption {
|
||||
type = types.str;
|
||||
default = "syslog-ng";
|
||||
@ -77,7 +84,7 @@ in {
|
||||
Sockets = "syslog.socket";
|
||||
StandardOutput = "null";
|
||||
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