home-manager/systems/common/obs.nix

33 lines
585 B
Nix
Raw Normal View History

{
pkgs,
libs,
config,
...
}: let
2024-02-16 16:45:51 +00:00
cfg = config.programs.obs;
in {
2024-02-16 16:45:51 +00:00
options.programs.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";
};
};
};
}