.files/nix/configurations/vanadium/kernel-overlay.nix
Léana 江 941a8c4c9d
vanadium: disable hypervisor guest support in kernel
This is hypervisor /guest/, we don't need that.
2025-09-11 09:32:27 +08:00

58 lines
1.6 KiB
Nix

final: prev: let
inherit (final) lib;
in {
linuxPackages = final.linuxPackagesFor (
prev.linuxPackages.kernel.override {
ignoreConfigErrors = true;
structuredExtraConfig = with lib.kernel; {
# optimisation for ryzen 7
# https://wiki.gentoo.org/wiki/Ryzen
SMP = yes;
X86_X2APIC = yes;
X86_AMD_PLATFORM_DEVICE = yes;
PROCESSOR_SELECT = yes;
CPU_SUP_AMD = yes;
SCHED_MC = yes;
X86_MCE = yes;
X86_MCE_AMD = yes;
PERF_EVENTS_INTEL_RAPL = yes;
# # unused option
# CPU_FREQ_DEFAULT_GOV_ONDEMAND = yes;
# # no such option
# MICROCODE_AMD = yes;
# # <5.17
# X86_ACPI_CPUFREQ = yes;
X86_AMD_PSTATE = yes;
X86_POWERNOW_K8 = no;
# # FIXME: crashes the build, seems to answer the question twice
# X86_AMD_FREQ_SENSITIVITY = yes;
# skipping firmware loading since it's handled by other parts of nix
SENSORS_K10TEMP = yes;
IOMMU_SUPPORT = yes;
AMD_IOMMU = yes;
# # no such option
# AMD_IOMMU_2 = yes;
# additional chipset drivers
I2C_PIIX4 = yes;
PINCTRL = yes;
PINCTRL_AMD = yes;
CRYPTO = yes;
CRYPTO_HW = yes;
CRYPTO_DEV_CCP = yes;
CRYPTO_DEV_SP_CCP = yes;
CRYPTO_DEV_CCP_CRYPTO = yes;
CRYPTO_DEV_CCP_DD = yes;
CRYPTO_DEV_SP_PSP = yes;
# Power management controller
X86_PLATFORM_DEVICES = yes;
AMD_PMC = yes;
# My config
DRM_AMDGPU = yes; # Recent AMD GPU
HYPERVISOR_GUEST = lib.mkForce no;
};
}
);
}