mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-25 17:53:17 +01:00
hardware: Suspend on power key press
This commit is contained in:
parent
7debc58d55
commit
a04be3defd
@ -13,7 +13,6 @@ in
|
|||||||
hardware = {
|
hardware = {
|
||||||
keyboardBinds = true;
|
keyboardBinds = true;
|
||||||
lidIgnore = true;
|
lidIgnore = true;
|
||||||
powerIgnore = true;
|
|
||||||
bluetooth = true;
|
bluetooth = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkEnableOption mkIf getExe singleton;
|
inherit (lib) mkEnableOption mkIf getExe singleton;
|
||||||
inherit (pkgs) piper interception-tools;
|
inherit (pkgs) piper interception-tools;
|
||||||
inherit (pkgs.interception-tools-plugins) dual-function-keys;
|
inherit (pkgs.interception-tools-plugins) dual-function-keys;
|
||||||
inherit (cfg) mouseSettings lidIgnore powerIgnore keyboardBinds bluetooth;
|
inherit (cfg) mouseSettings lidIgnore keyboardBinds bluetooth;
|
||||||
inherit (builtins) toJSON;
|
inherit (builtins) toJSON;
|
||||||
|
|
||||||
dualFunctionKeysConfig = "dual-function-keys.yaml";
|
dualFunctionKeysConfig = "dual-function-keys.yaml";
|
||||||
@ -17,7 +17,6 @@ in
|
|||||||
mouseSettings = mkEnableOption "piper for gaming mice";
|
mouseSettings = mkEnableOption "piper for gaming mice";
|
||||||
bluetooth = mkEnableOption "bluetooth support";
|
bluetooth = mkEnableOption "bluetooth support";
|
||||||
lidIgnore = mkEnableOption "ignoring the laptop lid on close";
|
lidIgnore = mkEnableOption "ignoring the laptop lid on close";
|
||||||
powerIgnore = mkEnableOption "ignoring the power button on press";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@ -29,7 +28,7 @@ in
|
|||||||
|
|
||||||
logind = {
|
logind = {
|
||||||
lidSwitch = mkIf lidIgnore "ignore";
|
lidSwitch = mkIf lidIgnore "ignore";
|
||||||
extraConfig = mkIf powerIgnore "HandlePowerKey=ignore";
|
extraConfig = "HandlePowerKey=suspend";
|
||||||
};
|
};
|
||||||
|
|
||||||
interception-tools = {
|
interception-tools = {
|
||||||
|
Loading…
Reference in New Issue
Block a user