diff options
Diffstat (limited to 'nixos/modules/services/continuous-integration/jenkins/default.nix')
-rw-r--r-- | nixos/modules/services/continuous-integration/jenkins/default.nix | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/nixos/modules/services/continuous-integration/jenkins/default.nix b/nixos/modules/services/continuous-integration/jenkins/default.nix index b01b5c3245a..29a81f066ab 100644 --- a/nixos/modules/services/continuous-integration/jenkins/default.nix +++ b/nixos/modules/services/continuous-integration/jenkins/default.nix @@ -15,7 +15,7 @@ in { user = mkOption { default = "jenkins"; - type = with types; string; + type = types.str; description = '' User the jenkins server should execute under. ''; @@ -23,16 +23,25 @@ in { group = mkOption { default = "jenkins"; - type = with types; string; + type = types.str; description = '' If the default user "jenkins" is configured then this is the primary group of that user. ''; }; + extraGroups = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "wheel" "dialout" ]; + description = '' + List of extra groups that the "jenkins" user should be a part of. + ''; + }; + home = mkOption { default = "/var/lib/jenkins"; - type = with types; string; + type = types.path; description = '' The path to use as JENKINS_HOME. If the default user "jenkins" is configured then this is the home of the "jenkins" user. @@ -57,12 +66,21 @@ in { environment = mkOption { default = { NIX_REMOTE = "daemon"; }; - type = with types; attrsOf string; + type = with types; attrsOf str; description = '' Additional environment variables to be passed to the jenkins process. The environment will always include JENKINS_HOME. ''; }; + + extraOptions = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "--debug=9" "--httpListenAddress=localhost" ]; + description = '' + Additional command line arguments to pass to Jenkins. + ''; + }; }; }; @@ -78,6 +96,7 @@ in { createHome = true; home = cfg.home; group = cfg.group; + extraGroups = cfg.extraGroups; useDefaultShell = true; uid = config.ids.uids.jenkins; }; @@ -94,7 +113,7 @@ in { path = cfg.packages; script = '' - ${pkgs.jdk}/bin/java -jar ${pkgs.jenkins} --httpPort=${toString cfg.port} + ${pkgs.jdk}/bin/java -jar ${pkgs.jenkins} --httpPort=${toString cfg.port} ${concatStringsSep " " cfg.extraOptions} ''; postStart = '' |