Linux headers not found, don't know how to install

I am trying to compile a C file that uses the linux headers, but I can’t seem to understand how to install them.

Here is the output:

../headers/vm.h:1:10: fatal error: 'linux/version.h' file not found
#include <linux/version.h>
1 error generated.
make: *** [Makefile:16: build] Error 1

And here’s the system info:

Linux nixos 6.1.38 #1-NixOS SMP PREEMPT_DYNAMIC Wed Jul  5 17:27:38 UTC 2023 x86_64 GNU/Linux

Any help will be greatly appreciated! :>

You enter a nix-shell with the package which includes that header. Locate the package using nix-locate from nix-index.

If you’re building a project that is already packaged in Nixpkgs, you can also use nix-shell '<nixpkgs>' -A yourPackageHere to get a shell with all required dependencies.