2024-04-18 14:21:33 -04:00
|
|
|
{
|
|
|
|
config,
|
2024-06-14 21:18:00 -04:00
|
|
|
inputs,
|
2024-04-18 14:21:33 -04:00
|
|
|
lib,
|
2024-06-14 21:18:00 -04:00
|
|
|
pkgs,
|
2024-04-18 14:21:33 -04:00
|
|
|
...
|
|
|
|
}: {
|
2024-06-14 21:18:00 -04:00
|
|
|
boot = {
|
2024-06-22 12:10:36 -04:00
|
|
|
blacklistedKernelModules = ["cros-usbpd-charger"];
|
|
|
|
|
|
|
|
extraModulePackages = with config.boot.kernelPackages; [
|
|
|
|
framework-laptop-kmod
|
|
|
|
];
|
|
|
|
|
2024-06-26 22:13:02 -04:00
|
|
|
initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
|
2024-06-14 21:18:00 -04:00
|
|
|
|
2024-06-22 12:10:36 -04:00
|
|
|
kernelModules = [
|
|
|
|
# https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage
|
|
|
|
"cros_ec_lpcs"
|
|
|
|
"cros_ec"
|
|
|
|
];
|
|
|
|
|
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
|
|
|
|
kernelParams = [
|
|
|
|
"nvme.noacpi=1" # https://community.frame.work/t/linux-battery-life-tuning/6665/156
|
|
|
|
];
|
2024-06-14 21:18:00 -04:00
|
|
|
};
|
2024-04-18 14:21:33 -04:00
|
|
|
|
2024-06-26 22:13:02 -04:00
|
|
|
environment.systemPackages = [pkgs.framework-tool] ++ lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool;
|
2024-04-18 14:21:33 -04:00
|
|
|
|
2024-06-14 21:18:00 -04:00
|
|
|
hardware = {
|
2024-06-22 12:10:36 -04:00
|
|
|
acpilight.enable = true;
|
2024-06-14 21:18:00 -04:00
|
|
|
enableAllFirmware = true;
|
|
|
|
|
2024-06-22 12:10:36 -04:00
|
|
|
sensor.iio.enable = true;
|
2024-06-14 21:18:00 -04:00
|
|
|
};
|
2024-04-18 14:21:33 -04:00
|
|
|
|
2024-06-22 12:10:36 -04:00
|
|
|
services = {
|
|
|
|
fprintd.enable = true;
|
|
|
|
fwupd.enable = true;
|
|
|
|
|
|
|
|
udev.extraRules = ''
|
|
|
|
# Ethernet expansion card support
|
|
|
|
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20"
|
|
|
|
'';
|
|
|
|
};
|
2024-06-26 22:13:02 -04:00
|
|
|
|
|
|
|
ar.hardware = {
|
|
|
|
cpu.intel = true;
|
|
|
|
gpu.intel = true;
|
|
|
|
laptop = true;
|
|
|
|
ssd = true;
|
|
|
|
};
|
2024-04-18 14:21:33 -04:00
|
|
|
}
|