add(nixos): power module udev

This commit is contained in:
kenji
2026-01-03 14:56:48 -06:00
parent ac265015eb
commit 137576a9a9
2 changed files with 11 additions and 0 deletions
+1
View File
@@ -16,6 +16,7 @@
./variables.nix
./kernel.nix
./input-method.nix
./power.nix # TODO: this one has to be optional
];
environment.systemPackages = with pkgs; [
# FIXME: must be on their own app
+10
View File
@@ -0,0 +1,10 @@
{pkgs, ...}: {
# USB wakeup configuration
services.udev.extraRules = ''
# Enable keyboard (NuPhy Air96 V2) wakeup from suspend
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="19f5", ATTRS{idProduct}=="3247", ATTR{power/wakeup}="enabled"
# Disable mouse (Pulsar 8Kdx) wakeup from suspend
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="3710", ATTRS{idProduct}=="5406", ATTR{power/wakeup}="disabled"
'';
}