1 { config, lib, pkgs, ... }:
6 cfg = config.hardware.ckb-next;
11 (mkRenamedOptionModule [ "hardware" "ckb" "enable" ] [ "hardware" "ckb-next" "enable" ])
12 (mkRenamedOptionModule [ "hardware" "ckb" "package" ] [ "hardware" "ckb-next" "package" ])
15 options.hardware.ckb-next = {
16 enable = mkEnableOption (lib.mdDoc "the Corsair keyboard/mouse driver");
19 type = types.nullOr types.int;
22 description = lib.mdDoc ''
23 Limit access to the ckb daemon to a particular group.
29 default = pkgs.ckb-next;
30 defaultText = literalExpression "pkgs.ckb-next";
31 description = lib.mdDoc ''
32 The package implementing the Corsair keyboard/mouse driver.
37 config = mkIf cfg.enable {
38 environment.systemPackages = [ cfg.package ];
40 systemd.services.ckb-next = {
41 description = "Corsair Keyboards and Mice Daemon";
42 wantedBy = ["multi-user.target"];
44 ExecStart = "${cfg.package}/bin/ckb-next-daemon ${optionalString (cfg.gid != null) "--gid=${builtins.toString cfg.gid}"}";
45 Restart = "on-failure";
51 maintainers = with lib.maintainers; [ ];