@@ -11,11 +11,15 @@ let
1111 cfg.extraClasspathEntries ++ [ "${riemann}/share/java/riemann.jar" ]
1212 );
1313
14+ riemannConfig = concatStringsSep "\n" (
15+ [cfg.config] ++ (map (f: ''(load-file "${f}")'') cfg.configFiles)
16+ );
17+
1418 launcher = writeScriptBin "riemann" ''
1519 #!/bin/sh
1620 exec ${openjdk}/bin/java ${concatStringsSep "\n" cfg.extraJavaOpts} \
1721 -cp ${classpath} \
18− riemann.bin ${writeText "riemann.config" cfg.config}
22+ riemann.bin ${writeText "riemann-config.clj" riemannConfig}
1923 '';
2024
2125in {
@@ -36,6 +40,16 @@ in {
3640 Contents of the Riemann configuration file.
3741 '';
3842 };
43+ configFiles = mkOption {
44+ type = with types; listOf path;
45+ default = [];
46+ description = ''
47+ Extra files containing Riemann configuration. These files will be
48+ loaded at runtime by Riemann (with Clojure's
49+ <literal>load-file</literal> function) at the end of the
50+ configuration.
51+ '';
52+ };
3953 extraClasspathEntries = mkOption {
4054 type = with types; listOf str;
4155 default = [];