From 4a940c8b5f6ffa0cfdca8b48e91fd38dedb145c2 Mon Sep 17 00:00:00 2001 From: 514fpv Date: Thu, 11 Apr 2024 14:26:48 +0800 Subject: [PATCH] refactor(chireiden): move trackpad workaround Implement workaround via powerManagement module. --- spec/chireiden/default.nix | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/spec/chireiden/default.nix b/spec/chireiden/default.nix index a1ea35b6..bfc15ee2 100644 --- a/spec/chireiden/default.nix +++ b/spec/chireiden/default.nix @@ -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 = [ ];