6afb255d97
these changes were generated with nixq 0.0.2, by running nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix two mentions of the mdDoc function remain in nixos/, both of which are inside of comments. Since lib.mdDoc is already defined as just id, this commit is a no-op as far as Nix (and the built manual) is concerned.
46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.hardware.ckb-next;
|
|
|
|
in
|
|
{
|
|
imports = [
|
|
(mkRenamedOptionModule [ "hardware" "ckb" "enable" ] [ "hardware" "ckb-next" "enable" ])
|
|
(mkRenamedOptionModule [ "hardware" "ckb" "package" ] [ "hardware" "ckb-next" "package" ])
|
|
];
|
|
|
|
options.hardware.ckb-next = {
|
|
enable = mkEnableOption "the Corsair keyboard/mouse driver";
|
|
|
|
gid = mkOption {
|
|
type = types.nullOr types.int;
|
|
default = null;
|
|
example = 100;
|
|
description = ''
|
|
Limit access to the ckb daemon to a particular group.
|
|
'';
|
|
};
|
|
|
|
package = mkPackageOption pkgs "ckb-next" { };
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
systemd.services.ckb-next = {
|
|
description = "Corsair Keyboards and Mice Daemon";
|
|
wantedBy = ["multi-user.target"];
|
|
serviceConfig = {
|
|
ExecStart = "${cfg.package}/bin/ckb-next-daemon ${optionalString (cfg.gid != null) "--gid=${builtins.toString cfg.gid}"}";
|
|
Restart = "on-failure";
|
|
};
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
maintainers = with lib.maintainers; [ ];
|
|
};
|
|
}
|