2018-09-26 05:55:51 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.programs.obs-studio;
|
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
in {
|
2018-09-26 05:55:51 +02:00
|
|
|
meta.maintainers = [ maintainers.adisbladis ];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
programs.obs-studio = {
|
|
|
|
enable = mkEnableOption "obs-studio";
|
|
|
|
|
2021-02-08 21:50:59 +01:00
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.obs-studio;
|
|
|
|
defaultText = literalExample "pkgs.obs-studio";
|
|
|
|
description = ''
|
|
|
|
OBS Studio package to install.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2021-06-26 23:29:50 +02:00
|
|
|
finalPackage = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
visible = false;
|
|
|
|
readOnly = true;
|
|
|
|
description = "Resulting customized OBS Studio package.";
|
|
|
|
};
|
|
|
|
|
2018-09-26 05:55:51 +02:00
|
|
|
plugins = mkOption {
|
2020-02-02 00:39:17 +01:00
|
|
|
default = [ ];
|
2021-06-26 23:29:50 +02:00
|
|
|
example = literalExample "[ pkgs.obs-studio-plugins.wlrobs ]";
|
2018-09-26 05:55:51 +02:00
|
|
|
description = "Optional OBS plugins.";
|
|
|
|
type = types.listOf types.package;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2021-06-26 23:29:50 +02:00
|
|
|
home.packages = [ cfg.finalPackage ];
|
|
|
|
programs.obs-studio.finalPackage =
|
|
|
|
pkgs.wrapOBS.override { obs-studio = cfg.package; } {
|
|
|
|
plugins = cfg.plugins;
|
|
|
|
};
|
2018-09-26 05:55:51 +02:00
|
|
|
};
|
|
|
|
}
|