diff options
author | Pascal Wittmann <PascalWittmann@gmx.net> | 2017-01-13 21:44:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-13 21:44:21 +0100 |
commit | d760d9cccc22decda7bf1b4ea1c9037053b54cb2 (patch) | |
tree | 30c32dc33f5ef7376fae724e41f5845fa627ed3c /nixos | |
parent | 0b8e3898705fb90096926469f60d06c3b3762cf7 (diff) | |
parent | ea7a8bf2d990413685ec9ad2e4c4e24dad7aafa5 (diff) | |
download | nixpkgs-d760d9cccc22decda7bf1b4ea1c9037053b54cb2.tar nixpkgs-d760d9cccc22decda7bf1b4ea1c9037053b54cb2.tar.gz nixpkgs-d760d9cccc22decda7bf1b4ea1c9037053b54cb2.tar.bz2 nixpkgs-d760d9cccc22decda7bf1b4ea1c9037053b54cb2.tar.lz nixpkgs-d760d9cccc22decda7bf1b4ea1c9037053b54cb2.tar.xz nixpkgs-d760d9cccc22decda7bf1b4ea1c9037053b54cb2.tar.zst nixpkgs-d760d9cccc22decda7bf1b4ea1c9037053b54cb2.zip |
Merge pull request #21836 from kierdavis/ckb
ckb: init at 0.2.6
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/hardware/ckb.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/nixos/modules/hardware/ckb.nix b/nixos/modules/hardware/ckb.nix new file mode 100644 index 00000000000..8429572a882 --- /dev/null +++ b/nixos/modules/hardware/ckb.nix @@ -0,0 +1,40 @@ +{ 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 ]; + }; + } |