diff --git a/modules/mouse-dpi.nix b/modules/mouse-dpi.nix index 2a52326..b6a2558 100644 --- a/modules/mouse-dpi.nix +++ b/modules/mouse-dpi.nix @@ -1,14 +1,15 @@ { lib, ... }: let - dpi = { - "SteelSeries SteelSeries Aerox 3 Wireless" = "600@1000"; - "Logitech G Pro Gaming Mouse" = "600@1000"; - "Logitech G305" = "600@1000"; - "Glorious Model O" = "600@1000"; - }; + setting = "600@1000"; + devices = [ + "SteelSeries SteelSeries Aerox 3 Wireless" + "Logitech G Pro Gaming Mouse" + "Logitech G305" + "Glorious Model O" + ]; in { services.udev.extraHwdb = lib.concatMapStrings - (n: "\nmouse:usb:*:name:${n}:*\n MOUSE_DPI=${dpi.${n}}\n") - (builtins.attrNames dpi); + (n: "\nmouse:usb:*:name:${n}:*\n MOUSE_DPI=${setting}\n") + (devices); }