summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorLassulus <github@lassul.us>2020-08-22 14:07:20 +0200
committerGitHub <noreply@github.com>2020-08-22 14:07:20 +0200
commitd8e671676d91fa9d3ef64b69ba7680d07d79f7a7 (patch)
tree8f2c2f3da3d5fb3694dee54bd4864e1f102585ec /nixos/modules
parenta778e66ebb08e12d78b088a0a81c406bb7e362fb (diff)
parentebc2067bc57fa918e57f8cd61d1574e6fe231e1b (diff)
downloadnixpkgs-d8e671676d91fa9d3ef64b69ba7680d07d79f7a7.tar
nixpkgs-d8e671676d91fa9d3ef64b69ba7680d07d79f7a7.tar.gz
nixpkgs-d8e671676d91fa9d3ef64b69ba7680d07d79f7a7.tar.bz2
nixpkgs-d8e671676d91fa9d3ef64b69ba7680d07d79f7a7.tar.lz
nixpkgs-d8e671676d91fa9d3ef64b69ba7680d07d79f7a7.tar.xz
nixpkgs-d8e671676d91fa9d3ef64b69ba7680d07d79f7a7.tar.zst
nixpkgs-d8e671676d91fa9d3ef64b69ba7680d07d79f7a7.zip
Merge pull request #89785 from buckley310/logstash
logstash: fix support for multiple plugin paths
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/logging/logstash.nix6
1 files changed, 1 insertions, 5 deletions
diff --git a/nixos/modules/services/logging/logstash.nix b/nixos/modules/services/logging/logstash.nix
index 21a83803fd8..bf92425f998 100644
--- a/nixos/modules/services/logging/logstash.nix
+++ b/nixos/modules/services/logging/logstash.nix
@@ -4,13 +4,9 @@ with lib;
 
 let
   cfg = config.services.logstash;
-  pluginPath = lib.concatStringsSep ":" cfg.plugins;
-  havePluginPath = lib.length cfg.plugins > 0;
   ops = lib.optionalString;
   verbosityFlag = "--log.level " + cfg.logLevel;
 
-  pluginsPath = "--path.plugins ${pluginPath}";
-
   logstashConf = pkgs.writeText "logstash.conf" ''
     input {
       ${cfg.inputConfig}
@@ -173,7 +169,7 @@ in
         ExecStart = concatStringsSep " " (filter (s: stringLength s != 0) [
           "${cfg.package}/bin/logstash"
           "-w ${toString cfg.filterWorkers}"
-          (ops havePluginPath pluginsPath)
+          (concatMapStringsSep " " (x: "--path.plugins ${x}") cfg.plugins)
           "${verbosityFlag}"
           "-f ${logstashConf}"
           "--path.settings ${logstashSettingsDir}"