hardware: Drop phone configuration

We'll handle this directly in the phone configuration.nix instead since
it's simplified now.
This commit is contained in:
Donovan Glover 2024-06-24 16:21:22 -04:00
parent a9ba67d449
commit e36fcaf2c6
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 3 additions and 14 deletions

View File

@ -21,12 +21,7 @@ in
phosh = true; phosh = true;
}; };
hardware = { hardware.keyboardBinds = true;
keyboardBinds = true;
bluetooth = true;
phone = true;
sensor = true;
};
system = { system = {
mullvad = true; mullvad = true;

View File

@ -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 phone sensor; inherit (cfg) mouseSettings disableLaptopKeyboard lidIgnore powerIgnore keyboardBinds bluetooth;
inherit (builtins) toJSON; inherit (builtins) toJSON;
dualFunctionKeysConfig = "dual-function-keys.yaml"; dualFunctionKeysConfig = "dual-function-keys.yaml";
@ -19,15 +19,11 @@ 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";
sensor = mkEnableOption "IIO sensor"; sensor = mkEnableOption "IIO sensor";
}; };
config = { config = {
hardware = { hardware.bluetooth.enable = mkIf bluetooth true;
bluetooth.enable = mkIf bluetooth true;
sensor.iio.enable = mkIf sensor true;
};
services = { services = {
ratbagd.enable = mkIf mouseSettings true; ratbagd.enable = mkIf mouseSettings true;
@ -40,8 +36,6 @@ 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 = {