mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-02-04 03:49:43 +01:00
hardware: Add phone support
This is untested but should work.
This commit is contained in:
parent
6ff271d4e2
commit
510ddfe9d7
@ -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 disableLaptopKeyboard lidIgnore powerIgnore keyboardBinds bluetooth;
|
inherit (cfg) mouseSettings disableLaptopKeyboard lidIgnore powerIgnore keyboardBinds bluetooth phone;
|
||||||
inherit (builtins) toJSON;
|
inherit (builtins) toJSON;
|
||||||
|
|
||||||
dualFunctionKeysConfig = "dual-function-keys.yaml";
|
dualFunctionKeysConfig = "dual-function-keys.yaml";
|
||||||
@ -19,6 +19,7 @@ in
|
|||||||
disableLaptopKeyboard = mkEnableOption "udev rule to disable laptop keyboard";
|
disableLaptopKeyboard = mkEnableOption "udev rule to disable laptop keyboard";
|
||||||
lidIgnore = mkEnableOption "ignoring the laptop lid on close";
|
lidIgnore = mkEnableOption "ignoring the laptop lid on close";
|
||||||
powerIgnore = mkEnableOption "ignoring the power button on press";
|
powerIgnore = mkEnableOption "ignoring the power button on press";
|
||||||
|
phone = mkEnableOption "Phone support";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@ -35,6 +36,8 @@ in
|
|||||||
logind = {
|
logind = {
|
||||||
lidSwitch = mkIf lidIgnore "ignore";
|
lidSwitch = mkIf lidIgnore "ignore";
|
||||||
extraConfig = mkIf powerIgnore "HandlePowerKey=ignore";
|
extraConfig = mkIf powerIgnore "HandlePowerKey=ignore";
|
||||||
|
powerKey = mkIf phone "suspend";
|
||||||
|
powerKeyLongPress = mkIf phone "poweroff";
|
||||||
};
|
};
|
||||||
|
|
||||||
interception-tools = {
|
interception-tools = {
|
||||||
|
Loading…
Reference in New Issue
Block a user