From 24941111e4530c1b2104b0f3612c55b659e22ec6 Mon Sep 17 00:00:00 2001 From: Markus Theil Date: Fri, 10 Apr 2026 19:35:24 +0200 Subject: [PATCH] kernel: enable CONFIG_HW_RANDOM to be built-in Starting with kernels around 6.18 and 6.19 I noticed, that /dev/hwrng was no longer present and the TPM 2.0 usually found in modern computers did therefore not automatically seed the kernel RNG with the hw random subsystem. Enabling CONFIG_HW_RANDOM to yes fixes this. The subsystem is rather small and should not increase the default kernel size too much. Signed-off-by: Markus Theil --- pkgs/os-specific/linux/kernel/common-config.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 70dfebee57b9..6d1015afdcfe 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -825,6 +825,8 @@ let whenOlder "6.2" yes ); # allow RDRAND to seed the RNG RANDOM_TRUST_BOOTLOADER = whenOlder "6.2" yes; # allow the bootloader to seed the RNG + # only when compiled as yes, TPM 2.0 will automatically seed the kernel RNG + HW_RANDOM = yes; MODULE_SIG = no; # r13y, generates a random key during build and bakes it in # Depends on MODULE_SIG and only really helps when you sign your modules