mirror of
https://github.com/nix-community/home-manager
synced 2024-12-25 03:09:47 +01:00
obs-studio: Allow package to be configurable (#1787)
This commit is contained in:
parent
d8dd2a09b0
commit
88e05a5472
1 changed files with 10 additions and 2 deletions
|
@ -5,7 +5,6 @@ with lib;
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.programs.obs-studio;
|
cfg = config.programs.obs-studio;
|
||||||
package = pkgs.obs-studio;
|
|
||||||
|
|
||||||
mkPluginEnv = packages:
|
mkPluginEnv = packages:
|
||||||
let
|
let
|
||||||
|
@ -29,6 +28,15 @@ in {
|
||||||
programs.obs-studio = {
|
programs.obs-studio = {
|
||||||
enable = mkEnableOption "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 {
|
plugins = mkOption {
|
||||||
default = [ ];
|
default = [ ];
|
||||||
example = literalExample "[ pkgs.obs-linuxbrowser ]";
|
example = literalExample "[ pkgs.obs-linuxbrowser ]";
|
||||||
|
@ -39,7 +47,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ package ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
xdg.configFile."obs-studio/plugins" =
|
xdg.configFile."obs-studio/plugins" =
|
||||||
mkIf (cfg.plugins != [ ]) { source = mkPluginEnv cfg.plugins; };
|
mkIf (cfg.plugins != [ ]) { source = mkPluginEnv cfg.plugins; };
|
||||||
|
|
Loading…
Reference in a new issue