From 88e05a5472d1eb95088d68e8a8e0083e67cd2d87 Mon Sep 17 00:00:00 2001 From: Tristan Date: Mon, 8 Feb 2021 15:50:59 -0500 Subject: [PATCH] obs-studio: Allow package to be configurable (#1787) --- modules/programs/obs-studio.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/programs/obs-studio.nix b/modules/programs/obs-studio.nix index 6df597838..8f2f56466 100644 --- a/modules/programs/obs-studio.nix +++ b/modules/programs/obs-studio.nix @@ -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; };