🚀 enable asus touchpad numpad
This commit is contained in:
parent
26a7df41d8
commit
a00798b058
3 changed files with 50 additions and 1 deletions
|
|
@ -2,7 +2,7 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
|
@ -78,6 +78,32 @@
|
|||
script = "${batteryLevelSufficient}/bin/battery-level-sufficient";
|
||||
};
|
||||
|
||||
# Trackpad
|
||||
# i2c for https://github.com/mohamed-badaoui/asus-touchpad-numpad-driver
|
||||
hardware.i2c.enable = true;
|
||||
systemd.services.asus-touchpad-numpad = {
|
||||
description =
|
||||
"Activate Numpad inside the touchpad with top right corner switch";
|
||||
documentation =
|
||||
[ "https://github.com/mohamed-badaoui/asus-touchpad-numpad-driver" ];
|
||||
path = [ pkgs.i2c-tools ];
|
||||
script = ''
|
||||
cd ${inputs.asus-touchpad-numpad-driver}
|
||||
# In the last argument here you choose your layout.
|
||||
${
|
||||
pkgs.python3.withPackages (ps: [ ps.libevdev ])
|
||||
}/bin/python asus_touchpad.py m433ia
|
||||
'';
|
||||
# Probably needed because it fails on boot seemingly because the driver
|
||||
# is not ready yet. Alternativly, you can use `sleep 3` or similar in the
|
||||
# `script`.
|
||||
serviceConfig = {
|
||||
RestartSec = "1s";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue