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