{ config, lib, pkgs, ... }:

with lib;

let
  cfg = config.settings.applications.obs-studio;
in {
  options = {
    settings.applications.obs-studio.enable = lib.mkOption {
      type = lib.types.bool;
      description = ''
        Enable obs studio with optional plugins
      '';
      default = false;
    };
  };

  config = mkIf cfg.enable {
    programs.obs-studio = {
      enable = true;
      plugins = with pkgs.obs-studio-plugins; [
        wlrobs
        obs-vaapi #optional AMD hardware acceleration
      ];
    };
  };
}
