Set HMCL environment variables

HMCL has scaling problems on high resolution screens, so you need to manually set the environment variable HMCL_JAVA_OPTS=-Dglass.win.uiScale=1.5

but neither by setting program.zsh.localVariables in home.nix, nor by using env HMCL_JAVA_OPTS=-Dglass.win.uiScale=1.5 hmclenvironment variable is not applied correctly

In other distributions, I can use java -Dglass.gtk.uiScale=1.5 -jar /path/to/HMCL.jar to apply this parameter. Maybe there is a variable that is the location of the HMCL package directory in /nix/store and I just need to replace /path/to/HMCL.jar in the startup command with the relative location of this variable

What is this variable and how should I define it declaratively?