about summary refs log tree commit diff
path: root/nixos/doc
diff options
context:
space:
mode:
authorRyan Lahfa <masterancpp@gmail.com>2024-01-13 16:51:00 +0100
committerGitHub <noreply@github.com>2024-01-13 16:51:00 +0100
commit32ccbe0927fc910f8fa3541f27f1aeb0effd8fbd (patch)
tree804a6f394683fdfbb60986618ee41e79dc2f1e52 /nixos/doc
parent243e5f6f58048a2f99d1311166c608ebaf46479f (diff)
parentec2016dda402ded1261d2af0e29d02506b191eab (diff)
downloadnixlib-32ccbe0927fc910f8fa3541f27f1aeb0effd8fbd.tar
nixlib-32ccbe0927fc910f8fa3541f27f1aeb0effd8fbd.tar.gz
nixlib-32ccbe0927fc910f8fa3541f27f1aeb0effd8fbd.tar.bz2
nixlib-32ccbe0927fc910f8fa3541f27f1aeb0effd8fbd.tar.lz
nixlib-32ccbe0927fc910f8fa3541f27f1aeb0effd8fbd.tar.xz
nixlib-32ccbe0927fc910f8fa3541f27f1aeb0effd8fbd.tar.zst
nixlib-32ccbe0927fc910f8fa3541f27f1aeb0effd8fbd.zip
Merge pull request #272029 from blitz/rust-for-linux
In-kernel Rust on Linux (Optional) (2nd Attempt)
Diffstat (limited to 'nixos/doc')
-rw-r--r--nixos/doc/manual/configuration/linux-kernel.chapter.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/nixos/doc/manual/configuration/linux-kernel.chapter.md b/nixos/doc/manual/configuration/linux-kernel.chapter.md
index 9d1b2bc2f9b8..99c94fe64e82 100644
--- a/nixos/doc/manual/configuration/linux-kernel.chapter.md
+++ b/nixos/doc/manual/configuration/linux-kernel.chapter.md
@@ -92,6 +92,24 @@ To use your custom kernel package in your NixOS configuration, set
 boot.kernelPackages = pkgs.linuxPackagesFor yourCustomKernel;
 ```
 
+## Rust
+
+The Linux kernel does not have Rust language support enabled by
+default. For kernel versions 6.7 or newer, experimental Rust support
+can be enabled. In a NixOS configuration, set:
+
+```nix
+boot.kernelPatches = [
+  {
+    name = "Rust Support";
+    patch = null;
+    features = {
+      rust = true;
+    };
+  }
+];
+```
+
 ## Developing kernel modules {#sec-linux-config-developing-modules}
 
 This section was moved to the [Nixpkgs manual](https://nixos.org/nixpkgs/manual#sec-linux-kernel-developing-modules).