1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00

obs-studio: Allow package to be configurable (#1787)

This commit is contained in:
Tristan 2021-02-08 15:50:59 -05:00 committed by GitHub
parent d8dd2a09b0
commit 88e05a5472
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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; };