nixos/jenkins: Introduce and make use of javaPackage option
Signed-off-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
@@ -83,6 +83,8 @@ in
|
|||||||
|
|
||||||
package = lib.mkPackageOption pkgs "jenkins" { };
|
package = lib.mkPackageOption pkgs "jenkins" { };
|
||||||
|
|
||||||
|
javaPackage = lib.mkPackageOption pkgs "jdk17" { };
|
||||||
|
|
||||||
packages = lib.mkOption {
|
packages = lib.mkOption {
|
||||||
default = [
|
default = [
|
||||||
pkgs.stdenv
|
pkgs.stdenv
|
||||||
@@ -233,7 +235,7 @@ in
|
|||||||
|
|
||||||
# For reference: https://wiki.jenkins.io/display/JENKINS/JenkinsLinuxStartupScript
|
# For reference: https://wiki.jenkins.io/display/JENKINS/JenkinsLinuxStartupScript
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.jdk17}/bin/java ${lib.concatStringsSep " " cfg.extraJavaOptions} -jar ${cfg.package}/webapps/jenkins.war --httpListenAddress=${cfg.listenAddress} \
|
${cfg.javaPackage}/bin/java ${lib.concatStringsSep " " cfg.extraJavaOptions} -jar ${cfg.package}/webapps/jenkins.war --httpListenAddress=${cfg.listenAddress} \
|
||||||
--httpPort=${toString cfg.port} \
|
--httpPort=${toString cfg.port} \
|
||||||
--prefix=${cfg.prefix} \
|
--prefix=${cfg.prefix} \
|
||||||
-Djava.awt.headless=true \
|
-Djava.awt.headless=true \
|
||||||
|
|||||||
Reference in New Issue
Block a user