From ead8ff2afd21776be89cc07a829c4a6476aebdf1 Mon Sep 17 00:00:00 2001 From: "Thomas G. Lopes" Date: Wed, 25 Mar 2026 12:41:35 +0000 Subject: [PATCH] stop declarative maccel parameter tuning in nixos --- modules/hosts/nixos.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/modules/hosts/nixos.nix b/modules/hosts/nixos.nix index cb2c596..3fc15af 100644 --- a/modules/hosts/nixos.nix +++ b/modules/hosts/nixos.nix @@ -100,12 +100,19 @@ in { hardware.maccel = { enable = true; enableCli = true; - parameters = { - mode = "linear"; - sensMultiplier = 1.0; - acceleration = 0.3; - offset = 2.0; - outputCap = 2.0; + }; + + # Dotfile-managed maccel settings: place an executable script at + # ~/.config/maccel/apply.sh with your preferred `maccel set ...` commands. + systemd.user.services.maccel-apply-dotfiles = { + description = "apply maccel params from ~/.config/maccel/apply.sh"; + wantedBy = ["default.target"]; + after = ["default.target"]; + serviceConfig = { + Type = "oneshot"; + ExecStart = '' + ${pkgs.bash}/bin/bash -lc 'PATH=/run/current-system/sw/bin:$PATH; if [ -x "$HOME/.config/maccel/apply.sh" ]; then "$HOME/.config/maccel/apply.sh"; fi' + ''; }; };