diff --git a/nixos/modules/services/logging/syslog-ng.nix b/nixos/modules/services/logging/syslog-ng.nix index 0b3f0cabb007..4a16b19134a0 100644 --- a/nixos/modules/services/logging/syslog-ng.nix +++ b/nixos/modules/services/logging/syslog-ng.nix @@ -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}"; }; }; };