diff options
Diffstat (limited to 'nixpkgs/nixos/modules/services/continuous-integration/jenkins/slave.nix')
-rw-r--r-- | nixpkgs/nixos/modules/services/continuous-integration/jenkins/slave.nix | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/nixpkgs/nixos/modules/services/continuous-integration/jenkins/slave.nix b/nixpkgs/nixos/modules/services/continuous-integration/jenkins/slave.nix index 3c0e6f78e74c..9b86917ab380 100644 --- a/nixpkgs/nixos/modules/services/continuous-integration/jenkins/slave.nix +++ b/nixpkgs/nixos/modules/services/continuous-integration/jenkins/slave.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: with lib; let cfg = config.services.jenkinsSlave; @@ -14,7 +14,7 @@ in { enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' If true the system will be configured to work as a jenkins slave. If the system is also configured to work as a jenkins master then this has no effect. In progress: Currently only assures the jenkins user is configured. @@ -24,7 +24,7 @@ in { user = mkOption { default = "jenkins"; type = types.str; - description = '' + description = lib.mdDoc '' User the jenkins slave agent should execute under. ''; }; @@ -32,7 +32,7 @@ in { group = mkOption { default = "jenkins"; type = types.str; - description = '' + description = lib.mdDoc '' If the default slave agent user "jenkins" is configured then this is the primary group of that user. ''; @@ -41,11 +41,20 @@ in { home = mkOption { default = "/var/lib/jenkins"; type = types.path; - description = '' + description = lib.mdDoc '' The path to use as JENKINS_HOME. If the default user "jenkins" is configured then this is the home of the "jenkins" user. ''; }; + + javaPackage = mkOption { + default = pkgs.jdk; + defaultText = literalExpression "pkgs.jdk"; + description = lib.mdDoc '' + Java package to install. + ''; + type = types.package; + }; }; }; @@ -64,5 +73,10 @@ in { uid = config.ids.uids.jenkins; }; }; + + programs.java = { + enable = true; + package = cfg.javaPackage; + }; }; } |