nixos/riemann: Add option configFiles
This commit is contained in:
parent
aa9c9aecbe
commit
76f065a8de
1 changed files with 15 additions and 1 deletions
|
@ -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 a new issue