You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
874 B
37 lines
874 B
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.hardware.openrgb;
|
|
|
|
in {
|
|
options.hardware.openrgb = {
|
|
enable = mkEnableOption "OpenRGB";
|
|
package = mkOption {
|
|
type = types.package;
|
|
default = pkgs.openrgb;
|
|
defaultText = "pkgs.openrgb";
|
|
description = ''
|
|
The package implementing OpenRGB.
|
|
'';
|
|
};
|
|
};
|
|
config = mkIf cfg.enable {
|
|
boot.kernelModules = [ "v4l2loopback" "i2c-dev" "i2c-piix4" ];
|
|
environment.systemPackages = [ cfg.package ];
|
|
services.udev.packages = [ cfg.package ];
|
|
|
|
systemd.services.openrgb = {
|
|
description = "OpenRGB Daemon";
|
|
wantedBy = [ "multi-user.target" ];
|
|
serviceConfig = {
|
|
ExecStart = "${cfg.package}/bin/openrgb --server";
|
|
Restart = "on-failure";
|
|
};
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
maintainers = with lib.maintainers; [ misterio77 ];
|
|
};
|
|
}
|
|
|