jenkins service: Add extraJavaOptions.

This is useful for the common case of passing arguments to
the JVM that runs Jenkins.

Changed files
+10 -1
nixos
modules
services
continuous-integration
jenkins
+10 -1
nixos/modules/services/continuous-integration/jenkins/default.nix
···
Additional command line arguments to pass to Jenkins.
'';
};
+
+
extraJavaOptions = mkOption {
+
type = types.listOf types.str;
+
default = [ ];
+
example = [ "-Xmx80m" ];
+
description = ''
+
Additional command line arguments to pass to the Java run time (as opposed to Jenkins).
+
'';
+
};
};
};
···
'';
script = ''
-
${pkgs.jdk}/bin/java -jar ${pkgs.jenkins}/webapps/jenkins.war --httpListenAddress=${cfg.listenAddress} \
+
${pkgs.jdk}/bin/java ${concatStringsSep " " cfg.extraJavaOptions} -jar ${pkgs.jenkins}/webapps/jenkins.war --httpListenAddress=${cfg.listenAddress} \
--httpPort=${toString cfg.port} \
--prefix=${cfg.prefix} \
${concatStringsSep " " cfg.extraOptions}