diff options
| author | Devin Finlinson <devin.finlinson@pm.me> | 2025-04-04 18:31:12 +0000 |
|---|---|---|
| committer | Devin Finlinson <devin.finlinson@pm.me> | 2025-04-04 18:31:12 +0000 |
| commit | ccaf81adeb68eafd2f011c51732f7262e4a60575 (patch) | |
| tree | f416bef274e70032e1ea119d8287cf6c8f578a3f /machines/zenbook | |
| parent | 0e825afbdd6d967e2823b664c8a2f013b225a0c1 (diff) | |
finally got the numpad-touchpad thing working
Diffstat (limited to 'machines/zenbook')
| -rw-r--r-- | machines/zenbook/default.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/machines/zenbook/default.nix b/machines/zenbook/default.nix index 1718f68..2f311ed 100644 --- a/machines/zenbook/default.nix +++ b/machines/zenbook/default.nix @@ -35,6 +35,32 @@ binfmt.emulatedSystems = ["aarch64-linux"]; }; hardware.onlykey.enable = true; + # 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 ${pkgs.fetchFromGitHub { + owner = "mohamed-badaoui"; + repo = "asus-touchpad-numpad-driver"; + # These needs to be updated from time to time + rev = "d80980af6ef776ee6acf42c193689f207caa7968"; + sha256 = "sha256-JM2wrHqJTqCIOhD/yvfbjLZEqdPRRbENv+N9uQHiipc="; + }} + # 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" ]; + }; nix.settings = { substituters = ["https://hyprland.cachix.org"]; |
