diff --git a/nixos/hosts/algae/default.nix b/nixos/hosts/algae/default.nix index e8345cf0..54f5c417 100644 --- a/nixos/hosts/algae/default.nix +++ b/nixos/hosts/algae/default.nix @@ -1,4 +1,4 @@ -{ ... }: +{ lib, ... }: { networking.hostName = "algae"; @@ -21,4 +21,20 @@ }; services.xserver.videoDrivers = [ "amdgpu" ]; + + # Required to reboot if you want to apply changes + # Prevent GH-894 + # https://askubuntu.com/a/1446653 + services.udev.extraRules = lib.mkAfter '' + # Enable USB port 3 wakeup + ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="2109", ATTRS{idProduct}=="2817", ATTRS{busnum}=="3", ATTR{power/wakeup}="enabled" + # Disable USB Switcher wakeup + ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="5411", ATTR{power/wakeup}="disabled" + # Enable trackball - "Kensington SlimBlade Pro Trackball(Wired)" wakeup + ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="047d", ATTRS{idProduct}=="80d7", ATTR{power/wakeup}="enabled" + # Enable keyboard - "REALFORCE 87 US" wakeup + ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="0853", ATTRS{idProduct}=="0146", ATTR{power/wakeup}="enabled" + # Enable keyboard - "ThinkPad Compact USB Keyboard with TrackPoint" wakeup + ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="17ef", ATTRS{idProduct}=="6047", ATTR{power/wakeup}="enabled" + ''; }