2022-07-08 16:49:09 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.streamdeck-ui;
|
2022-11-12 13:14:21 +00:00
|
|
|
in
|
|
|
|
{
|
2022-07-08 16:49:09 +00:00
|
|
|
options.programs.streamdeck-ui = {
|
|
|
|
enable = mkEnableOption (lib.mdDoc "streamdeck-ui");
|
|
|
|
|
|
|
|
autoStart = mkOption {
|
|
|
|
default = true;
|
|
|
|
type = types.bool;
|
|
|
|
description = lib.mdDoc "Whether streamdeck-ui should be started automatically.";
|
|
|
|
};
|
2022-11-12 13:14:21 +00:00
|
|
|
|
2022-12-30 20:04:52 +00:00
|
|
|
package = mkPackageOptionMD pkgs "streamdeck-ui" {
|
2022-11-12 13:14:21 +00:00
|
|
|
default = [ "streamdeck-ui" ];
|
|
|
|
};
|
|
|
|
|
2022-07-08 16:49:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = with pkgs; [
|
2022-11-12 13:14:21 +00:00
|
|
|
cfg.package
|
2023-08-12 03:17:37 +00:00
|
|
|
(mkIf cfg.autoStart (makeAutostartItem { name = "streamdeck-ui-noui"; package = cfg.package; }))
|
2022-07-08 16:49:09 +00:00
|
|
|
];
|
|
|
|
|
2022-11-12 13:14:21 +00:00
|
|
|
services.udev.packages = [ cfg.package ];
|
2022-07-08 16:49:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta.maintainers = with maintainers; [ majiir ];
|
|
|
|
}
|