Files
nixos-hardware/framework/kmod.nix
r-vdp e11482075d framework/kmod: remove compatibility with Linux version < 6.10
Upstream changes broke the checks that we had.
By now we have 6.12 as the LTS, and 24.05 went out of support, so I
think we don't need to support this anymore.
Anyone still on such old kernel versions, can apply the patch manually
if needed.
2025-10-30 10:54:55 +01:00

36 lines
997 B
Nix

{
config,
lib,
...
}:
{
options.hardware.framework.enableKmod =
(lib.mkEnableOption "the community-created Framework kernel module that allows interacting with the embedded controller from sysfs.")
// {
# enable by default on NixOS >= 24.05 and kernel >= 6.10
default = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.10";
defaultText = "enabled by default if kernel >= 6.10";
};
config = lib.mkIf config.hardware.framework.enableKmod {
assertions = [
{
assertion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.10";
message = "The framework laptop kernel module requires Linux 6.10 or above";
}
];
boot = {
extraModulePackages = with config.boot.kernelPackages; [
framework-laptop-kmod
];
# https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage
kernelModules = [
"cros_ec"
"cros_ec_lpcs"
];
};
};
}