home-manager/modules/programs/obs-studio.nix

49 lines
1.1 KiB
Nix
Raw Normal View History

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