🚀 enable asus touchpad numpad
This commit is contained in:
parent
26a7df41d8
commit
a00798b058
3 changed files with 50 additions and 1 deletions
17
flake.lock
17
flake.lock
|
@ -18,6 +18,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"asus-touchpad-numpad-driver": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1646981564,
|
||||||
|
"narHash": "sha256-qanPTmP2Sctq4ybiUFzIiADP2gZH8HhajBORUSIXb04=",
|
||||||
|
"owner": "mohamed-badaoui",
|
||||||
|
"repo": "asus-touchpad-numpad-driver",
|
||||||
|
"rev": "a2bada610ebb3fc002fceb53ddf93bc799241867",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "mohamed-badaoui",
|
||||||
|
"repo": "asus-touchpad-numpad-driver",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"dracula-fish": {
|
"dracula-fish": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -303,6 +319,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
|
"asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver",
|
||||||
"dracula-fish": "dracula-fish",
|
"dracula-fish": "dracula-fish",
|
||||||
"emacs-overlay": "emacs-overlay",
|
"emacs-overlay": "emacs-overlay",
|
||||||
"forgit-git": "forgit-git",
|
"forgit-git": "forgit-git",
|
||||||
|
|
|
@ -33,6 +33,12 @@
|
||||||
|
|
||||||
# VSCode plugin
|
# VSCode plugin
|
||||||
nix-flake-tools.url = "github:rastertail/nix-flake-tools";
|
nix-flake-tools.url = "github:rastertail/nix-flake-tools";
|
||||||
|
|
||||||
|
# Laptop Touchpad
|
||||||
|
asus-touchpad-numpad-driver = {
|
||||||
|
url = "github:mohamed-badaoui/asus-touchpad-numpad-driver";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, agenix, home-manager, nixpkgs, utils, ... }:
|
outputs = inputs@{ self, agenix, home-manager, nixpkgs, utils, ... }:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -78,6 +78,32 @@
|
||||||
script = "${batteryLevelSufficient}/bin/battery-level-sufficient";
|
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
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
|
Loading…
Reference in a new issue