refactor(chireiden): move trackpad workaround

Implement workaround via powerManagement module.
This commit is contained in:
514fpv 2024-04-11 14:26:48 +08:00
parent b47ce80f16
commit 4a940c8b5f
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw

View file

@ -26,24 +26,17 @@
powerManagement.enable = true;
powerManagement.cpuFreqGovernor = "powersave";
powerManagement.resumeCommands = ''
# trackpad driver resume workaround
${pkgs.kmod}/bin/modprobe -r psmouse
${pkgs.kmod}/bin/modprobe psmouse
'';
hardware.nvidia.prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:5:0:0";
};
# trackpad driver resume workaround
systemd.services.trackpad-workaround = {
description = "Reload trackpad driver";
after = [ "suspend.target" ];
wantedBy = [ "suspend.target" ];
path = with pkgs; [ kmod ];
script = ''
modprobe -r psmouse
modprobe psmouse
'';
};
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];