From 73c837b710b79c2ec9533d6e066f72c38b7289db Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Wed, 11 May 2022 20:30:16 -0400 Subject: [PATCH] prevent keyboard from waking up machine --- modules/hardware/default.nix | 1 + modules/hardware/sleep.nix | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 modules/hardware/sleep.nix diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix index 77a4ef7..fd15c7e 100644 --- a/modules/hardware/default.nix +++ b/modules/hardware/default.nix @@ -7,6 +7,7 @@ ./monitors.nix ./mouse.nix ./networking.nix + ./sleep.nix ./wifi.nix ]; diff --git a/modules/hardware/sleep.nix b/modules/hardware/sleep.nix new file mode 100644 index 0000000..df5c8cc --- /dev/null +++ b/modules/hardware/sleep.nix @@ -0,0 +1,8 @@ +{ ... }: { + + # Prevent wake from keyboard + powerManagement.powerDownCommands = '' + echo disabled > /sys/bus/usb/devices/1-6/power/wakeup + ''; + +}