Disable autoModules to avoid adding unintentional modules (Fixes #13)

This commit is contained in:
Lan Tian 2025-12-17 19:32:11 -08:00
parent 52d03c7f4e
commit bb7b8aa687
No known key found for this signature in database
GPG Key ID: 04E66B6B25A0862B

View File

@ -42,6 +42,12 @@ lib.makeOverridable (
hardened ? false, hardened ? false,
rt ? false, rt ? false,
# Build as much components as possible as kernel modules, including disabled ones.
# This can enable unexpected modules. Disabling by default for as close behavior
# as possible compared to upstream.
# https://github.com/xddxdd/nix-cachyos-kernel/issues/13
autoModules ? false,
# See nixpkgs/pkgs/os-specific/linux/kernel/generic.nix for additional options. # See nixpkgs/pkgs/os-specific/linux/kernel/generic.nix for additional options.
# Additional args are passed to buildLinux. # Additional args are passed to buildLinux.
... ...
@ -152,7 +158,7 @@ lib.makeOverridable (
# CachyOS's options has some unused options for older kernel versions # CachyOS's options has some unused options for older kernel versions
ignoreConfigErrors = args.ignoreConfigErrors or true; ignoreConfigErrors = args.ignoreConfigErrors or true;
inherit structuredExtraConfig; inherit structuredExtraConfig autoModules;
extraMeta = { extraMeta = {
description = "Linux CachyOS Kernel" + lib.optionalString lto " with Clang+ThinLTO"; description = "Linux CachyOS Kernel" + lib.optionalString lto " with Clang+ThinLTO";