2024-02-15 20:17:48 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
libs,
|
2024-02-16 16:41:53 +00:00
|
|
|
config,
|
2024-02-15 20:17:48 +00:00
|
|
|
...
|
2024-02-16 16:41:53 +00:00
|
|
|
}: let
|
2024-02-16 16:45:51 +00:00
|
|
|
cfg = config.programs.obs;
|
2024-02-16 16:41:53 +00:00
|
|
|
in {
|
2024-02-16 16:45:51 +00:00
|
|
|
options.programs.obs = {
|
2024-02-16 16:41:53 +00:00
|
|
|
autostart = pkgs.lib.mkOption {
|
|
|
|
type = pkgs.lib.types.bool;
|
|
|
|
default = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
|
|
|
programs.obs-studio = {
|
|
|
|
enable = true;
|
|
|
|
plugins = with pkgs.obs-studio-plugins; [
|
|
|
|
obs-source-record
|
|
|
|
];
|
|
|
|
};
|
2024-02-15 20:17:48 +00:00
|
|
|
|
2024-02-16 16:41:53 +00:00
|
|
|
xdg.configFile = pkgs.lib.mkIf cfg.autostart {
|
|
|
|
"autostart/obs-autostart.desktop" = libs.mkAutostart {
|
|
|
|
inherit pkgs;
|
|
|
|
name = "obs";
|
|
|
|
command = "obs --startreplaybuffer";
|
|
|
|
};
|
2024-02-15 20:17:48 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|