dosei: add temporary logiops module

This commit is contained in:
Oystein Kristoffer Tveit 2024-08-05 16:37:18 +02:00
parent 8ef40e52db
commit fdcd4e16c2
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
2 changed files with 53 additions and 0 deletions

View File

@ -6,6 +6,7 @@
./services/avahi.nix ./services/avahi.nix
./services/docker.nix ./services/docker.nix
./services/jenkins.nix ./services/jenkins.nix
./services/logiops.nix
./services/wstunnel.nix ./services/wstunnel.nix
]; ];

View File

@ -0,0 +1,52 @@
{ pkgs, ... }:
{
# TODO: remove when merged: https://github.com/NixOS/nixpkgs/pull/167388
systemd.services.logid = let
config = pkgs.writeText "logid.cfg" ''
devices: (
{
name: "Wireless Mouse MX Master";
smartshift:
{
on: true;
threshold: 30;
torque: 50;
};
hiresscroll:
{
hires: true;
invert: false;
target: true;
up: {
mode: "Axis";
axis: "REL_WHEEL_HI_RES";
multiplier: 1;
},
down: {
mode: "Axis";
axis: "REL_WHEEL_HI_RES";
multiplier: -1;
},
};
dpi: 800;
}
);
'';
in {
description = "Logitech Configuration Daemon";
startLimitIntervalSec = 0;
wants = [ "multi-user.target" ];
after = [ "multi-user.target" ];
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.logiops}/bin/logid --config ${config}";
User = "root";
ExecReload = "/bin/kill -HUP $MAINPID";
Restart="on-failure";
};
};
hardware.logitech.wireless.enable = true;
}