nixos/logiops: init (#511476)

This commit is contained in:
Sandro
2026-05-13 20:49:43 +00:00
committed by GitHub
3 changed files with 64 additions and 0 deletions
@@ -158,6 +158,8 @@
- [porxie](https://codeberg.org/Blooym/porxie), a correct and efficient ATProto blob proxy for secure content delivery. Available as [services.porxie](#opt-services.porxie.enable).
- [LogiOps](https://github.com/PixlOne/logiops), a unofficial userspace driver for HID++ Logitech devices. Available as [services.logiops](#opt-services.logiops.enable).
## Backward Incompatibilities {#sec-release-26.05-incompatibilities}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
+1
View File
@@ -688,6 +688,7 @@
./services/hardware/lcd.nix
./services/hardware/libinput.nix
./services/hardware/lirc.nix
./services/hardware/logiops.nix
./services/hardware/monado.nix
./services/hardware/nvidia-container-toolkit
./services/hardware/nvidia-optimus.nix
@@ -0,0 +1,61 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.logiops;
configFormat = pkgs.formats.libconfig { };
configFile = configFormat.generate "logid.cfg" cfg.config;
in
{
options = {
services.logiops = {
enable = lib.mkEnableOption "LogiOps, a unofficial userspace driver for HID++ Logitech devices";
package = lib.mkPackageOption pkgs "logiops" { };
config = lib.mkOption {
type = configFormat.type;
default = { };
example = lib.literalExpression ''
devices = [
{
name = "Wireless Mouse MX Master";
dpi = 1000;
smartshift =
{
on = true;
threshold = 30;
torque = 50;
};
}
];
'';
description = ''
The standard libconfig-style config for LogiOps.
'';
};
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
services.dbus.packages = [ cfg.package ];
systemd = {
packages = [ cfg.package ];
services.logid = {
wantedBy = [ "graphical.target" ];
serviceConfig.ExecStart = [
""
"${lib.getExe cfg.package} -c ${configFile}"
];
};
};
};
meta.maintainers = with lib.maintainers; [ bokicoder ];
}