This commit is contained in:
2023-04-01 00:12:40 +02:00
parent 1de2a362d7
commit b716c8a288
12 changed files with 193 additions and 57 deletions

View File

@@ -16,26 +16,32 @@ in {
};
config = lib.mkIf true {
environment.etc."logid.cfg".text = ''
systemd.services.logiops = {
description = "An unofficial userspace driver for HID++ Logitech devices";
wantedBy = [ "default.target" ];
serviceConfig = let
logiopsConfig = pkgs.writeText "logiops.cfg" ''
devices: (
{
name: "Wireless Mouse MX Master 3";
hiresscroll: {
hires: true;
target: false;
};
smartshift: {
on: true;
threshold: 30;
default_threshold: 30;
};
dpi: 800;
}
);
'';
systemd.services.logiops = {
description = "An unofficial userspace driver for HID++ Logitech devices";
wantedBy = [ "default.target" ];
serviceConfig = {
);
'';
in {
Type = "simple";
ExecStart = let
renice = lib.optionalString cfg.renice "${pkgs.coreutils-full}/bin/nice -n ${builtins.toString cfg.reniceValue}";
in "${renice} ${pkgs.logiops}/bin/logid";
in "${renice} ${pkgs.logiops}/bin/logid -c ${logiopsConfig}";
};
};
};