mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-01-08 15:09:42 +01:00
hardware: Add bluetooth support
This commit is contained in:
parent
ce5f3ea6d7
commit
996f36e239
@ -15,6 +15,7 @@ in
|
|||||||
disableLaptopKeyboard = true;
|
disableLaptopKeyboard = true;
|
||||||
lidIgnore = true;
|
lidIgnore = true;
|
||||||
powerIgnore = true;
|
powerIgnore = true;
|
||||||
|
bluetooth = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
|
@ -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;
|
inherit (cfg) mouseSettings disableLaptopKeyboard lidIgnore powerIgnore keyboardBinds bluetooth;
|
||||||
inherit (builtins) toJSON;
|
inherit (builtins) toJSON;
|
||||||
|
|
||||||
dualFunctionKeysConfig = "dual-function-keys.yaml";
|
dualFunctionKeysConfig = "dual-function-keys.yaml";
|
||||||
@ -15,14 +15,18 @@ in
|
|||||||
options.modules.hardware = {
|
options.modules.hardware = {
|
||||||
keyboardBinds = mkEnableOption "start button for rofi, caps lock as escape, etc.";
|
keyboardBinds = mkEnableOption "start button for rofi, caps lock as escape, etc.";
|
||||||
mouseSettings = mkEnableOption "piper for gaming mice";
|
mouseSettings = mkEnableOption "piper for gaming mice";
|
||||||
|
bluetooth = mkEnableOption "bluetooth support";
|
||||||
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";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
hardware.bluetooth.enable = mkIf bluetooth true;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
ratbagd.enable = mkIf mouseSettings true;
|
ratbagd.enable = mkIf mouseSettings true;
|
||||||
|
blueman.enable = mkIf bluetooth true;
|
||||||
|
|
||||||
udev.extraRules = mkIf disableLaptopKeyboard ''
|
udev.extraRules = mkIf disableLaptopKeyboard ''
|
||||||
KERNEL=="event*", ATTRS{name}=="AT Translated Set 2 keyboard", ENV{LIBINPUT_IGNORE_DEVICE}="1"
|
KERNEL=="event*", ATTRS{name}=="AT Translated Set 2 keyboard", ENV{LIBINPUT_IGNORE_DEVICE}="1"
|
||||||
|
Loading…
Reference in New Issue
Block a user