nixos/logiops: init

This commit is contained in:
wxlyyy
2026-04-27 19:31:30 +08:00
parent 52e9baa56b
commit bdb94e30e4
3 changed files with 64 additions and 0 deletions
@@ -132,6 +132,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
@@ -686,6 +686,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 ];
}