nixos/logiops: init (#511476)
This commit is contained in:
@@ -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. -->
|
||||
|
||||
@@ -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 ];
|
||||
}
|
||||
Reference in New Issue
Block a user