-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add loads of cli tools, add logiops config for MX Vertical mous…
…e, add config to avoid cluttering the home directory
- Loading branch information
Showing
7 changed files
with
251 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
{ } | ||
{ | ||
logiops = ./logiops.nix; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
let | ||
cfg = config.services.logiops; | ||
renderedConfig = (pkgs.formats.libconfig { }).generate "logid.cfg" cfg.settings; | ||
in | ||
{ | ||
options.services.logiops = { | ||
enable = mkEnableOption (mdDoc "Logiops HID++ configuration"); | ||
|
||
package = mkPackageOption pkgs "logiops" { }; | ||
|
||
settings = mkOption { | ||
type = (pkgs.formats.libconfig { }).type; | ||
default = { }; | ||
example = { | ||
devices = [{ | ||
name = "Wireless Mouse MX Master 3"; | ||
|
||
smartshift = { | ||
on = true; | ||
threshold = 20; | ||
}; | ||
|
||
hiresscroll = { | ||
hires = true; | ||
invert = false; | ||
target = false; | ||
}; | ||
|
||
dpi = 1500; | ||
|
||
buttons = [ | ||
{ | ||
cid = "0x53"; | ||
action = { | ||
type = "Keypress"; | ||
keys = [ "KEY_FORWARD" ]; | ||
}; | ||
} | ||
{ | ||
cid = "0x56"; | ||
action = { | ||
type = "Keypress"; | ||
keys = [ "KEY_BACK" ]; | ||
}; | ||
} | ||
]; | ||
}]; | ||
}; | ||
description = mdDoc '' | ||
Logid configuration. Refer to | ||
[the `logiops` wiki](https://github.com/PixlOne/logiops/wiki/Configuration) | ||
for details on supported values. | ||
''; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
services.udev.packages = [ pkgs.logitech-udev-rules ]; | ||
environment.etc."logid.cfg".source = renderedConfig; | ||
|
||
systemd.packages = [ cfg.package ]; | ||
systemd.services.logid = { | ||
wantedBy = [ "multi-user.target" ]; | ||
restartTriggers = [ renderedConfig ]; | ||
}; | ||
}; | ||
|
||
meta.maintainers = with maintainers; [ ckie ]; | ||
} |
Oops, something went wrong.