summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorSean Buckley <sean.bck@gmail.com>2020-06-08 00:04:15 -0400
committerSean Buckley <sean.bck@gmail.com>2020-06-08 00:04:15 -0400
commitebc2067bc57fa918e57f8cd61d1574e6fe231e1b (patch)
tree6e4b14742ac9fe809a8d681eddacd7a1ca27f2c5 /nixos/modules
parent467ce5a9f45aaf96110b41eb863a56866e1c2c3c (diff)
downloadnixpkgs-ebc2067bc57fa918e57f8cd61d1574e6fe231e1b.tar
nixpkgs-ebc2067bc57fa918e57f8cd61d1574e6fe231e1b.tar.gz
nixpkgs-ebc2067bc57fa918e57f8cd61d1574e6fe231e1b.tar.bz2
nixpkgs-ebc2067bc57fa918e57f8cd61d1574e6fe231e1b.tar.lz
nixpkgs-ebc2067bc57fa918e57f8cd61d1574e6fe231e1b.tar.xz
nixpkgs-ebc2067bc57fa918e57f8cd61d1574e6fe231e1b.tar.zst
nixpkgs-ebc2067bc57fa918e57f8cd61d1574e6fe231e1b.zip
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}"