dotfiles/nixos/hardware/sleep.nix

13 lines
280 B
Nix
Raw Normal View History

2022-12-21 21:18:03 +00:00
{ config, pkgs, lib, ... }: {
2022-12-21 21:18:03 +00:00
config = lib.mkIf (config.physical && pkgs.stdenv.isLinux) {
# Prevent wake from keyboard
powerManagement.powerDownCommands = ''
for wakeup in /sys/bus/usb/devices/1-*/power/wakeup; do echo disabled > $wakeup; done
'';
};
}