VScode isn't detecting jdk

I have open jdk 20 installed on my Nixos Laptop, and programs.java.enable set to true in my configuration files. However, when I open a java file in vscode, I get a popup tab asking me to configure the java runtime. The only options I’m given are to locate an existing jdk or to install a new one.

I’m assuming this is a case of nix not having the jdk in the standard directory, but where/what do I need to point vscode to for it to fully work for java development and not just lock me into running javac from the command line?

For anyone wondering, I’ve dug a bit deeper and managed to solve this. The gui directory selector was not working, but changing the path manually in vscode’s settings.json seems to have worked. You need to add the following line: "java.home": "/run/current-system/sw/lib/openjdk".