hardware: Suspend on power key press

This commit is contained in:
Donovan Glover 2024-07-23 15:37:24 -04:00
parent 7debc58d55
commit a04be3defd
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 2 additions and 4 deletions

View File

@ -13,7 +13,6 @@ in
hardware = {
keyboardBinds = true;
lidIgnore = true;
powerIgnore = true;
bluetooth = true;
};

View File

@ -4,7 +4,7 @@ let
inherit (lib) mkEnableOption mkIf getExe singleton;
inherit (pkgs) piper interception-tools;
inherit (pkgs.interception-tools-plugins) dual-function-keys;
inherit (cfg) mouseSettings lidIgnore powerIgnore keyboardBinds bluetooth;
inherit (cfg) mouseSettings lidIgnore keyboardBinds bluetooth;
inherit (builtins) toJSON;
dualFunctionKeysConfig = "dual-function-keys.yaml";
@ -17,7 +17,6 @@ in
mouseSettings = mkEnableOption "piper for gaming mice";
bluetooth = mkEnableOption "bluetooth support";
lidIgnore = mkEnableOption "ignoring the laptop lid on close";
powerIgnore = mkEnableOption "ignoring the power button on press";
};
config = {
@ -29,7 +28,7 @@ in
logind = {
lidSwitch = mkIf lidIgnore "ignore";
extraConfig = mkIf powerIgnore "HandlePowerKey=ignore";
extraConfig = "HandlePowerKey=suspend";
};
interception-tools = {