Merge pull request #264036 from wegank/unifi-hotfix

nixos/unifi: fix use of optionalString
This commit is contained in:
Weijia Wang 2023-10-29 00:33:19 +02:00 committed by GitHub
commit eaf8053ad5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,9 +6,9 @@ let
cmd = ''
@${cfg.jrePackage}/bin/java java \
${optionalString (lib.versionAtLeast (lib.getVersion cfg.jrePackage) "16")
"--add-opens java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED "
("--add-opens java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED "
+ "--add-opens java.base/sun.security.util=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED "
+ "--add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED"} \
+ "--add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED")} \
${optionalString (cfg.initialJavaHeapSize != null) "-Xms${(toString cfg.initialJavaHeapSize)}m"} \
${optionalString (cfg.maximumJavaHeapSize != null) "-Xmx${(toString cfg.maximumJavaHeapSize)}m"} \
-jar ${stateDir}/lib/ace.jar