lol

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.

+10
+10
nixos/modules/services/networking/unifi.nix
··· 12 12 ] 13 13 ++ (lib.optional (cfg.initialJavaHeapSize != null) "-Xms${(toString cfg.initialJavaHeapSize)}m") 14 14 ++ (lib.optional (cfg.maximumJavaHeapSize != null) "-Xmx${(toString cfg.maximumJavaHeapSize)}m") 15 + ++ cfg.extraJvmOptions 15 16 ++ [ "-jar" "${stateDir}/lib/ace.jar" ]); 16 17 in 17 18 { ··· 82 83 description = lib.mdDoc '' 83 84 Set the maximum heap size for the JVM in MB. If this option isn't set, the 84 85 JVM will decide this value at runtime. 86 + ''; 87 + }; 88 + 89 + services.unifi.extraJvmOptions = lib.mkOption { 90 + type = with lib.types; listOf str; 91 + default = [ ]; 92 + example = lib.literalExpression ''["-Xlog:gc"]''; 93 + description = lib.mdDoc '' 94 + Set extra options to pass to the JVM. 85 95 ''; 86 96 }; 87 97