`VK_LAYER_KHRONOS_validation` doesn't exist, although `vulkan-validation-layers` is installed

Hello guys!
I’m currently this shell.nix for rust development and I need vulkan for an open source project.

Now if I run vulkaninfo | rg -i "validation" I’m not getting VK_LAYER_KHRONOS_validation as expected although the shell includes vulkan-validation-layers and the search says, that it’s officially from KHRONOS:

So what am I doing wrong?

You probably need to add this to hardware.opengl.extraPackages so that it’s put into the right place for vulkan to discover it at runtime. If I recall correctly…

May I ask where I need to put this ( hardware.opengl.extraPackages) in my shell.nix?

Oh I’m so sorry, I think I was doing too many things at once. I’m not sure, there’s probably some env var you need to set to tell vulkan to look in additional places for layers, which would be a more applicable shell.nix solution. However, this plane wifi is not going to allow me to look that up I doubt.

VK_LAYER_PATH = "${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d";

1 Like