33 lines
585 B
Nix
33 lines
585 B
Nix
{
|
|
pkgs,
|
|
libs,
|
|
config,
|
|
...
|
|
}: let
|
|
cfg = config.services.obs;
|
|
in {
|
|
options.services.obs = {
|
|
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
|
|
];
|
|
};
|
|
|
|
xdg.configFile = pkgs.lib.mkIf cfg.autostart {
|
|
"autostart/obs-autostart.desktop" = libs.mkAutostart {
|
|
inherit pkgs;
|
|
name = "obs";
|
|
command = "obs --startreplaybuffer";
|
|
};
|
|
};
|
|
};
|
|
}
|