mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-01-25 07:08:38 +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 (pkgs) piper interception-tools;
|
||||
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;
|
||||
|
||||
dualFunctionKeysConfig = "dual-function-keys.yaml";
|
||||
@ -19,6 +19,7 @@ in
|
||||
disableLaptopKeyboard = mkEnableOption "udev rule to disable laptop keyboard";
|
||||
lidIgnore = mkEnableOption "ignoring the laptop lid on close";
|
||||
powerIgnore = mkEnableOption "ignoring the power button on press";
|
||||
phone = mkEnableOption "Phone support";
|
||||
};
|
||||
|
||||
config = {
|
||||
@ -35,6 +36,8 @@ in
|
||||
logind = {
|
||||
lidSwitch = mkIf lidIgnore "ignore";
|
||||
extraConfig = mkIf powerIgnore "HandlePowerKey=ignore";
|
||||
powerKey = mkIf phone "suspend";
|
||||
powerKeyLongPress = mkIf phone "poweroff";
|
||||
};
|
||||
|
||||
interception-tools = {
|
||||
|
Loading…
Reference in New Issue
Block a user