Help needed to set up a devshell for Vulkan

I have been trying to get this flake devshell to work for a few weeks now but I have not been able to get my system to recognize VULKAN_SDK environment path. When examining the Vulkan Installation Analysis, it states that there is no VULKAN_SDK directory and no Implicit layers directory.

There have been instances of other people with similar problems, but their solutions either do not work, or are simply “i figured it out” with no other context.

Here is my flake:

{
  description = "Description for the project";

  inputs = {
    flake-parts.url = "github:hercules-ci/flake-parts";
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  };

  outputs = inputs@{ flake-parts, ... }:
    flake-parts.lib.mkFlake { inherit inputs; } {
      imports = [
        # To import a flake module
        # 1. Add foo to inputs
        # 2. Add foo as a parameter to the outputs function
        # 3. Add here: foo.flakeModule

      ];
      systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
      perSystem = { config, self', inputs', pkgs, system, ... }: {
        # Per-system attributes can be defined here. The self' and inputs'
        # module parameters provide easy access to attributes of the same
        # system.

        # Equivalent to  inputs'.nixpkgs.legacyPackages.hello;
	devShells.default = pkgs.mkShell {
	  buildInputs = with pkgs; [
	    dotnet-sdk_8
            freetype
	    boost
	    cmake
            catch2
            glm
            gcc

            #Xorg
       	    xorg.libXxf86vm
            xorg.libXi
            xorg.libX11
            xorg.libXrandr

            #Vulkan
            glfw
            shaderc
	    shaderc.bin
            shaderc.static
            shaderc.dev
            shaderc.lib
            vulkan-volk
            vulkan-headers
            vulkan-loader
            vulkan-validation-layers
            vulkan-tools
            shaderc
            renderdoc
            tracy
            vulkan-tools-lunarg
          ];
	  
	  LD_LIBRARY_PATH="${pkgs.vulkan-loader}/lib";
#  	  VULKAN_SDK = "${pkgs.vulkan-validation-layers}/share/vulkan/implicit_layer.d";
  	  VK_LAYER_PATH = "${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d";
          VULKAN_LIB_DIR = "${pkgs.shaderc.dev}/lib";

	  shellHook = "
	    echo ${pkgs.vulkan-loader}
	    echo ${pkgs.vulkan-validation-layers}
	  ";
        };

      };
      flake = {
        # The usual flake attributes can be defined here, including system-
        # agnostic ones like nixosModule and system-enumerating ones, although
        # those are more easily expressed in perSystem.

      };
    };
}

In addition here is my project output if it assists in any way as it is trying to grab a filesystem from Nvidia that seems to be outdated

[sn@nixos:~/Documents/projects/vulkan-engine]$ make test
./VulkanTest
validation layer: loader_add_layer_properties: 'layers' tag not supported until file version 1.0.1, but /run/opengl-driver/share/vulkan/implicit_layer.d/nvidia_layers.json is reporting version 1
available extensions:
	VK_KHR_device_group_creation
	VK_KHR_display
	VK_KHR_external_fence_capabilities
	VK_KHR_external_memory_capabilities
	VK_KHR_external_semaphore_capabilities
	VK_KHR_get_display_properties2
	VK_KHR_get_physical_device_properties2
	VK_KHR_get_surface_capabilities2
	VK_KHR_surface
	VK_KHR_surface_protected_capabilities
	VK_KHR_wayland_surface
	VK_KHR_xcb_surface
	VK_KHR_xlib_surface
	VK_EXT_acquire_drm_display
	VK_EXT_acquire_xlib_display
	VK_EXT_debug_report
	VK_EXT_debug_utils
	VK_EXT_direct_mode_display
	VK_EXT_display_surface_counter
	VK_EXT_surface_maintenance1
	VK_EXT_swapchain_colorspace
	VK_KHR_portability_enumeration
	VK_LUNARG_direct_driver_loading
required extensions:
	VK_KHR_surface
	VK_KHR_wayland_surface
	VK_EXT_debug_utils
Device count: 1
physical device: NVIDIA GeForce RTX 3070 Laptop GPU
Present mode: V-Sync
validation layer: Validation Error: [ VUID-VkPipelineMultisampleStateCreateInfo-sType-sType ] | MessageID = 0x380a52f5 | vkCreateGraphicsPipelines(): pCreateInfos[0].pMultisampleState->sType must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO. The Vulkan spec states: sType must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-sType-sType)
validation layer: Validation Error: [ VUID-VkPipelineMultisampleStateCreateInfo-rasterizationSamples-parameter ] | MessageID = 0xf690d38b | vkCreateGraphicsPipelines(): pCreateInfos[0].pMultisampleState->rasterizationSamples is zero. The Vulkan spec states: rasterizationSamples must be a valid VkSampleCountFlagBits value (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-rasterizationSamples-parameter)
validation layer: Validation Error: [ VUID_Undefined ] | MessageID = 0x79de34d4 | vkCreateGraphicsPipelines(): pCreateInfos[0].pMultisampleState->rasterizationSamples must be greater than 0.
failed to acquire next swap chain image!
make: *** [Makefile:11: test] Error 1

Thanks for any help

Solution found after falling down a rabbit hole, updated kernel to 6.6 and then updated to nvidia 560 drivers, if that is all I will close the thread in a few days. Also optimized the flake in case anyone needs it in the future.

{
    description = "Vulkan Dev Flake";

    inputs = {
        nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    };

    outputs = { self, nixpkgs }@inputs:
    let
        lib = nixpkgs.lib;
        pkgs = import inputs.nixpkgs {
            system = "x86_64-linux";
        };
    in
        {
        devShells.x86_64-linux.default = pkgs.mkShell rec {
            name = "Test Env";
            nativeBuildInputs = with pkgs;[

            ];

            buildInputs = with pkgs;[
		libxkbcommon
		libGL

		wayland

		SDL2
		SDL2_ttf

		boost		
                cmake
                catch2
                glm
                gcc

                pkg-config

                xorg.libX11
                xorg.libXrandr
                xorg.libXcursor
                xorg.libXi
                xorg.libXxf86vm

                cargo

                glfw3
                mesa
                glslang
                renderdoc
                spirv-tools
                vulkan-volk
                vulkan-tools
                vulkan-loader
                vulkan-headers
                vulkan-validation-layers
                vulkan-tools-lunarg
                vulkan-extension-layer
            ];

            packages = with pkgs; [

            ];

            shellHook = with pkgs; ''
                echo "Welcome to my Vulkan Shell"
                echo "vulkan loader: ${vulkan-loader}"
                echo "vulkan headers: $vulkan-headers}"
                echo "validation layer: ${vulkan-validation-layers}"
                echo "tools: ${vulkan-tools}"
                echo "tools-lunarg: ${vulkan-tools-lunarg}"
                echo "extension-layer: ${vulkan-extension-layer}"
            '';

            LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
            VK_LAYER_PATH = "${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d";
            VULKAN_SDK = "${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d";
            #VK_INSTANCE_LAYERS = "
            XDG_DATA_DIRS = builtins.getEnv "XDG_DATA_DIRS";
            XDG_RUNTIME_DIR = "/run/user/1000";
        };
    };
}