mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 21:53:32 +00:00
ea7a8bf2d9
ckb is a driver for Corsair keyboards/mice. It also contains a graphical tool for configuring their LED backlight settings. The driver is implemented as a userland daemon. A NixOS module is included that runs this as a systemd service.
41 lines
879 B
Nix
41 lines
879 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.hardware.ckb;
|
|
|
|
in
|
|
{
|
|
options.hardware.ckb = {
|
|
enable = mkEnableOption "the Corsair keyboard/mouse driver";
|
|
|
|
package = mkOption {
|
|
type = types.package;
|
|
default = pkgs.ckb;
|
|
defaultText = "pkgs.ckb";
|
|
description = ''
|
|
The package implementing the Corsair keyboard/mouse driver.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
systemd.services.ckb = {
|
|
description = "Corsair Keyboard Daemon";
|
|
wantedBy = ["multi-user.target"];
|
|
script = "${cfg.package}/bin/ckb-daemon";
|
|
serviceConfig = {
|
|
Restart = "always";
|
|
StandardOutput = "syslog";
|
|
};
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
maintainers = with lib.maintainers; [ kierdavis ];
|
|
};
|
|
}
|