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