feat(hardware): move hardware inputs to dedicated module
This commit is contained in:
@@ -2,9 +2,7 @@
|
||||
imports = [
|
||||
./amdgpu.nix
|
||||
./bluetooth.nix
|
||||
./corne.nix
|
||||
./ibm-trackpoint.nix
|
||||
./opentablet.nix
|
||||
./sound.nix
|
||||
./input
|
||||
];
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.mySystem.hardware.corne;
|
||||
cfg = config.mySystem.hardware.input.corne;
|
||||
in {
|
||||
options.mySystem.hardware.corne.allowHidAccess = mkEnableOption "Enable HID access to the corne keyboard";
|
||||
options.mySystem.hardware.input.corne.allowHidAccess = mkEnableOption "Enable HID access to the corne keyboard";
|
||||
config.services.udev = mkIf cfg.allowHidAccess {
|
||||
extraRules = ''
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{serial}=="*vial:f64c2b3c*", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
|
||||
8
system/hardware/input/default.nix
Normal file
8
system/hardware/input/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
imports = [
|
||||
./corne.nix
|
||||
./ibm-trackpoint.nix
|
||||
./opentablet.nix
|
||||
./trackball.nix
|
||||
];
|
||||
}
|
||||
@@ -4,9 +4,9 @@
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.mySystem.hardware.ibmTrackpoint;
|
||||
cfg = config.mySystem.hardware.input.ibmTrackpoint;
|
||||
in {
|
||||
options.mySystem.hardware.ibmTrackpoint.disable = mkEnableOption "Disable IBM’s trackpoint on ThinkPad";
|
||||
options.mySystem.hardware.input.ibmTrackpoint.disable = mkEnableOption "Disable IBM’s trackpoint on ThinkPad";
|
||||
config.services.udev = mkIf cfg.disable {
|
||||
extraRules = ''
|
||||
ATTRS{name}=="*TPPS/2 IBM TrackPoint", ENV{ID_INPUT}="", ENV{ID_INPUT_MOUSE}="", ENV{ID_INPUT_POINTINGSTICK}=""
|
||||
@@ -4,9 +4,9 @@
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.mySystem.hardware.opentablet;
|
||||
cfg = config.mySystem.hardware.input.opentablet;
|
||||
in {
|
||||
options.mySystem.hardware.opentablet.enable = mkEnableOption "Enables OpenTablet drivers";
|
||||
options.mySystem.hardware.input.opentablet.enable = mkEnableOption "Enables OpenTablet drivers";
|
||||
config.hardware.opentabletdriver = mkIf cfg.enable {
|
||||
inherit (cfg) enable;
|
||||
daemon.enable = true;
|
||||
3
system/hardware/input/trackball.nix
Normal file
3
system/hardware/input/trackball.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
services.libinput.mouse.middleEmulation = true;
|
||||
}
|
||||
Reference in New Issue
Block a user