diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..5704d0a --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,15 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/**", + "${env:C_INCLUDE_PATH}" + ], + "defines": [], + "cStandard": "c11", + "intelliSenseMode": "linux-gcc-x64" + } + ], + "version": 4 + } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..dd72655 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "*.h": "c" + } +} \ No newline at end of file diff --git a/flake.nix b/flake.nix index da8fff5..697b9af 100644 --- a/flake.nix +++ b/flake.nix @@ -14,16 +14,17 @@ let pkgs = import nixpkgs { inherit system; }; - linux_dev = pkgs.linuxKernel.kernels.linux_zen.dev; + linux = pkgs.linuxKernel.kernels.linux_zen; in { devShells = { default = pkgs.mkShell { - packages = [ linux_dev ]; + packages = [ linux.moduleBuildDependencies ]; - LINUX_MODULES_FOLDER = "${linux_dev}/lib/modules/${linux_dev.modDirVersion}"; + LINUX_MODULES_FOLDER = "${linux.dev}/lib/modules/${linux.modDirVersion}"; + C_INCLUDE_PATH = "${linux.dev}/lib/modules/${linux.modDirVersion}/source/include"; shellHook = '' - echo "Current Linux Kernel used : ${linux_dev.version}" + echo "Current Linux Kernel used : ${linux.version}" ''; }; };