···89diff --git a/src/clang_parser.cpp b/src/clang_parser.cpp
10index b1db8ff..0cfb01f 100644
11---- a/src/clang_parser.cpp
12-+++ b/src/clang_parser.cpp
13@@ -140,6 +140,9 @@ static bool is_dir(const std::string& path)
14 // Both ksrc and kobj are guaranteed to be != "", if at least some trace of kernel sources was found.
15- static std::tuple<std::string, std::string> get_kernel_dirs(const struct utsname& utsname)
16 {
17+ // NB (aseipp): special case the kernel directory for nix
18+ return { "@NIX_KERNEL_SRC@/source", "@NIX_KERNEL_SRC@/build" };
···89diff --git a/src/clang_parser.cpp b/src/clang_parser.cpp
10index b1db8ff..0cfb01f 100644
11+--- a/src/utils.cpp
12++++ b/src/utils.cpp
13@@ -140,6 +140,9 @@ static bool is_dir(const std::string& path)
14 // Both ksrc and kobj are guaranteed to be != "", if at least some trace of kernel sources was found.
15+ std::tuple<std::string, std::string> get_kernel_dirs(const struct utsname& utsname)
16 {
17+ // NB (aseipp): special case the kernel directory for nix
18+ return { "@NIX_KERNEL_SRC@/source", "@NIX_KERNEL_SRC@/build" };