From b37cabb49ba88350014a15f836fd68ba25c446e7 Mon Sep 17 00:00:00 2001 From: yaroslav Date: Thu, 31 Jul 2025 20:09:36 +0300 Subject: [PATCH] add Ratchet's numberpad driver --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 7 ++++++- hosts/Ratchet/hardware-Ratchet.nix | 23 ++++++++++++++++++++++- 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index 9639775..71247fc 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,25 @@ { "nodes": { + "asus-numberpad-driver": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1753248535, + "narHash": "sha256-PLx2TADTNe1EktBt6VUtQEWkEG+k/I9I/+Amyg+o+g8=", + "owner": "asus-linux-drivers", + "repo": "asus-numberpad-driver", + "rev": "de1def2d69a63c1fb79926eaff6f06e4a5805a6d", + "type": "github" + }, + "original": { + "owner": "asus-linux-drivers", + "repo": "asus-numberpad-driver", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -140,6 +160,7 @@ }, "root": { "inputs": { + "asus-numberpad-driver": "asus-numberpad-driver", "hm-stable": "hm-stable", "home-manager": "home-manager", "impermanence": "impermanence", diff --git a/flake.nix b/flake.nix index 802efa7..c81d934 100644 --- a/flake.nix +++ b/flake.nix @@ -18,16 +18,21 @@ url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs-stable"; }; + asus-numberpad-driver = { + url = "github:asus-linux-drivers/asus-numberpad-driver"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; zapret.url = "github:n0vvvonder/zapret-flake.nix"; }; - outputs = { self, nixpkgs-unstable, impermanence, home-manager, zapret, nixpkgs-stable, hm-stable, ...}@inputs: { + outputs = { self, nixpkgs-unstable, impermanence, home-manager, zapret, nixpkgs-stable, hm-stable, asus-numberpad-driver, ...}@inputs: { nixosConfigurations = { Ratchet = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ impermanence.nixosModules.impermanence + asus-numberpad-driver.nixosModules.default ./hosts/generic/configuration_generic.nix ./hosts/generic/users.nix ./hosts/Ratchet/hardware-Ratchet.nix diff --git a/hosts/Ratchet/hardware-Ratchet.nix b/hosts/Ratchet/hardware-Ratchet.nix index eb4fbb2..bed4c45 100644 --- a/hosts/Ratchet/hardware-Ratchet.nix +++ b/hosts/Ratchet/hardware-Ratchet.nix @@ -38,9 +38,15 @@ }; fileSystems."/home/yaroslav/tmp" = { - device = "nome"; + device = "none"; fsType = "tmpfs"; }; + fileSystems."/Volumes/Trash" = + { + device = "aphelion:/Volumes/Trash"; + options = ["x-mount.mkdir" "user" "rw" "noauto" ]; + fsType = "nfs"; + }; services.nfs.server.enable = true; @@ -49,6 +55,21 @@ boot.supportedFilesystems = [ "zfs" ]; networking.hostId = "63367a21"; + services.asus-numberpad-driver = { + enable = true; + layout = "up5401ea"; + wayland = true; + runtimeDir = "/run/user/1000/"; + waylandDisplay = "wayland-0"; + ignoreWaylandDisplayEnv = false; + config = { + "activation_time" = "0.5"; + # More Configuration Options + "enabled_touchpad_pointer" = "0"; + + }; + }; + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction