Added Bosto Touchpad Support
This commit is contained in:
parent
a87f36a088
commit
0dc0a1aafb
2 changed files with 50 additions and 2 deletions
43
modules/nixos/hardware/bosto-touchpad/default.nix
Normal file
43
modules/nixos/hardware/bosto-touchpad/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
system,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.hardware.bosto-touchpad;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.hardware.bosto-touchpad.enable = lib.mkOption {
|
||||||
|
type = with lib.types; uniq bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable Bosto Touchpad Support";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (cfg.enable) {
|
||||||
|
|
||||||
|
# boot.kernelModules = [ "hid-magicmouse" ];
|
||||||
|
|
||||||
|
# Add Driver Options to extra ModprobeConfig, to support reloading hid-magicmouse
|
||||||
|
boot.extraModprobeConfig = ''
|
||||||
|
options hid-magicmouse emulate_scroll_wheel=Y emulate_3button=Y middle_click_3finger=Y scroll_acceleration=Y scroll_speed=10
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Service to load Driver with options
|
||||||
|
systemd.services."bostoService" = {
|
||||||
|
description = "Bosto Touchpad Service";
|
||||||
|
path = [ pkgs.kmod ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.kmod.out}/bin/modprobe -r hid-magicmouse
|
||||||
|
${pkgs.kmod.out}/bin/modprobe hid-magicmouse emulate_scroll_wheel=Y emulate_3button=Y middle_click_3finger=Y scroll_acceleration=Y scroll_speed=10
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [];
|
boot.initrd.kernelModules = [];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [
|
||||||
|
"kvm-amd"
|
||||||
|
];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
# Setup Nvidia Driver
|
# Setup Nvidia Driver
|
||||||
|
@ -25,6 +27,9 @@
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Enable Bosto Tochpad Support (See ../../../modules/nixos/hardware/bosto-touchpad/default.nix)
|
||||||
|
hardware.bosto-touchpad.enable = true;
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/b3344eaa-384e-4779-92b8-92f6e9a27d7d";
|
{ device = "/dev/disk/by-uuid/b3344eaa-384e-4779-92b8-92f6e9a27d7d";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
|
|
Loading…
Add table
Reference in a new issue