nixos/unifi: Add extraJvmOptions option
This can be useful for adding extra logging, tweaking garbage collector parameters, and for using JMX to monitor the JVM.
This commit is contained in:
parent
50ff8ff3f9
commit
07828dc05b
1 changed files with 10 additions and 0 deletions
|
@ -12,6 +12,7 @@ let
|
|||
]
|
||||
++ (lib.optional (cfg.initialJavaHeapSize != null) "-Xms${(toString cfg.initialJavaHeapSize)}m")
|
||||
++ (lib.optional (cfg.maximumJavaHeapSize != null) "-Xmx${(toString cfg.maximumJavaHeapSize)}m")
|
||||
++ cfg.extraJvmOptions
|
||||
++ [ "-jar" "${stateDir}/lib/ace.jar" ]);
|
||||
in
|
||||
{
|
||||
|
@ -85,6 +86,15 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
services.unifi.extraJvmOptions = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = [ ];
|
||||
example = lib.literalExpression ''["-Xlog:gc"]'';
|
||||
description = lib.mdDoc ''
|
||||
Set extra options to pass to the JVM.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
Loading…
Reference in a new issue