From 700f9aa5647dc7c67f7c01bc22ffcae057a0b026 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Thu, 20 Jun 2024 11:07:26 -0400 Subject: [PATCH] hardware: Add IIO sensor support Doesn't seem to work yet but shouldn't hurt to add for now. --- modules/hardware.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/hardware.nix b/modules/hardware.nix index 72e68363..8599fe04 100644 --- a/modules/hardware.nix +++ b/modules/hardware.nix @@ -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 phone; + inherit (cfg) mouseSettings disableLaptopKeyboard lidIgnore powerIgnore keyboardBinds bluetooth phone sensor; inherit (builtins) toJSON; dualFunctionKeysConfig = "dual-function-keys.yaml"; @@ -20,10 +20,14 @@ in lidIgnore = mkEnableOption "ignoring the laptop lid on close"; powerIgnore = mkEnableOption "ignoring the power button on press"; phone = mkEnableOption "Phone support"; + sensor = mkEnableOption "IIO sensor"; }; config = { - hardware.bluetooth.enable = mkIf bluetooth true; + hardware = { + bluetooth.enable = mkIf bluetooth true; + sensor.iio.enable = mkIf sensor true; + }; services = { ratbagd.enable = mkIf mouseSettings true;