mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
nixos/riemann: Add option configFiles
This commit is contained in:
parent
aa9c9aecbe
commit
76f065a8de
@ -11,11 +11,15 @@ let
|
||||
cfg.extraClasspathEntries ++ [ "${riemann}/share/java/riemann.jar" ]
|
||||
);
|
||||
|
||||
riemannConfig = concatStringsSep "\n" (
|
||||
[cfg.config] ++ (map (f: ''(load-file "${f}")'') cfg.configFiles)
|
||||
);
|
||||
|
||||
launcher = writeScriptBin "riemann" ''
|
||||
#!/bin/sh
|
||||
exec ${openjdk}/bin/java ${concatStringsSep "\n" cfg.extraJavaOpts} \
|
||||
-cp ${classpath} \
|
||||
riemann.bin ${writeText "riemann.config" cfg.config}
|
||||
riemann.bin ${writeText "riemann-config.clj" riemannConfig}
|
||||
'';
|
||||
|
||||
in {
|
||||
@ -36,6 +40,16 @@ in {
|
||||
Contents of the Riemann configuration file.
|
||||
'';
|
||||
};
|
||||
configFiles = mkOption {
|
||||
type = with types; listOf path;
|
||||
default = [];
|
||||
description = ''
|
||||
Extra files containing Riemann configuration. These files will be
|
||||
loaded at runtime by Riemann (with Clojure's
|
||||
<literal>load-file</literal> function) at the end of the
|
||||
configuration.
|
||||
'';
|
||||
};
|
||||
extraClasspathEntries = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
|
Loading…
Reference in New Issue
Block a user