3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #133092 from TomatoCream/add-jvm-to-nexus

This commit is contained in:
Janik 2023-07-14 01:45:19 +02:00 committed by GitHub
commit fc7d1abf50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,6 @@ let
cfg = config.services.nexus;
in
{
options = {
services.nexus = {
@ -20,6 +19,16 @@ in
description = lib.mdDoc "Package which runs Nexus3";
};
jdkPackage = mkOption {
type = types.package;
default = pkgs.openjdk8;
defaultText = literalExample "pkgs.openjdk8";
example = literalExample "pkgs.openjdk8";
description = ''
The JDK package to use.
'';
};
user = mkOption {
type = types.str;
default = "nexus";
@ -110,7 +119,7 @@ in
createHome = true;
};
users.groups.${cfg.group} = {};
users.groups.${cfg.group} = { };
systemd.services.nexus = {
description = "Sonatype Nexus3";
@ -123,6 +132,7 @@ in
NEXUS_USER = cfg.user;
NEXUS_HOME = cfg.home;
INSTALL4J_JAVA_HOME = "${cfg.jdkPackage}";
VM_OPTS_FILE = pkgs.writeText "nexus.vmoptions" cfg.jvmOpts;
};