mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 08:14:00 +01:00
hardware: Suspend on power key press
This commit is contained in:
parent
7debc58d55
commit
a04be3defd
@ -13,7 +13,6 @@ in
|
||||
hardware = {
|
||||
keyboardBinds = true;
|
||||
lidIgnore = true;
|
||||
powerIgnore = true;
|
||||
bluetooth = true;
|
||||
};
|
||||
|
||||
|
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user