obs-studio: Allow package to be configurable (#1787)
This commit is contained in:
parent
d8dd2a09b0
commit
88e05a5472
|
@ -5,7 +5,6 @@ with lib;
|
|||
let
|
||||
|
||||
cfg = config.programs.obs-studio;
|
||||
package = pkgs.obs-studio;
|
||||
|
||||
mkPluginEnv = packages:
|
||||
let
|
||||
|
@ -29,6 +28,15 @@ in {
|
|||
programs.obs-studio = {
|
||||
enable = mkEnableOption "obs-studio";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.obs-studio;
|
||||
defaultText = literalExample "pkgs.obs-studio";
|
||||
description = ''
|
||||
OBS Studio package to install.
|
||||
'';
|
||||
};
|
||||
|
||||
plugins = mkOption {
|
||||
default = [ ];
|
||||
example = literalExample "[ pkgs.obs-linuxbrowser ]";
|
||||
|
@ -39,7 +47,7 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ package ];
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."obs-studio/plugins" =
|
||||
mkIf (cfg.plugins != [ ]) { source = mkPluginEnv cfg.plugins; };
|
||||
|
|
Loading…
Reference in a new issue