1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-14 06:59:41 +01:00

Add framework-laptop-kmod for framework laptops

Whether this is enabled is an option as requested in #829
This commit is contained in:
gatkitty 2024-01-25 17:52:57 -05:00 committed by gaykitty
parent f84eaffc35
commit fad336a2e8
2 changed files with 19 additions and 0 deletions

View file

@ -2,6 +2,7 @@
imports = [ imports = [
../../../common/pc/laptop ../../../common/pc/laptop
../../../common/pc/laptop/ssd ../../../common/pc/laptop/ssd
../../kmod.nix
]; ];
# Fix TRRS headphones missing a mic # Fix TRRS headphones missing a mic

18
framework/kmod.nix Normal file
View file

@ -0,0 +1,18 @@
{ config, lib, ... }:
{
options.hardware.framework.enableKmod = lib.mkOption {
type = lib.types.bool;
# Enable by default if on new enough version of NixOS
default = (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05");
description = ''
Enable the community created Framework kernel module that
allows interacting with the embedded controller from sysfs.
'';
};
config = lib.mkIf options.hardware.framework.enableKmod {
boot.extraModulePackages = with config.boot.kernelPackages; [
framework-laptop-kmod
];
};
}