dotfiles/modules/nixos/hardware/sleep.nix
2023-02-20 20:37:37 -05:00

13 lines
280 B
Nix

{ config, pkgs, lib, ... }: {
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
'';
};
}