wimpysworld / obs-studio-flaking-loaded

OBS Studio for NixOS ❄️ that bundles an extensive collection of 3rd party plugins
MIT License
5 stars 0 forks source link

nix-shell 'fastfood' way to run obs WITH plugins? #20

Open coderofsalvation opened 12 months ago

coderofsalvation commented 12 months ago

Nixos newbie here, nice to meet you.

Q: Is there a way to run plugins in such way, that I can easily garbage collect everything?

REASON: on my lowdiskspace nixos netbook I run many programs (which i don't often need) in the following 'fastfood' fashion:

#!/bin/sh
nix-shell -p mandelbulber --run mandelbulber2
read -p "[?] cleanup? [y/n]" y
test $y = y && nix-collect-garbage

I tried something similar with the following ~/bin/obs-studio shellscript, and eventhough it runs..it can't find the plugins (even after symlinking)

#! /usr/bin/env nix-shell
#!  nix-shell -p obs-studio-plugins.droidcam-obs obs-studio-plugins.input-overlay obs-studio-plugins.obs-backgroundremoval obs-studio bash -i bash
echo setting up plugins 
plugins=~/.config/obs-studio/plugins 
test -d $plugins/$i/bin/64bit || mkdir -p $plugins/$i/bin/64bit

for i in overlay backgroundremoval droidcam; do 
  ln -fs $(find /nix/store/*$i* -maxdepth 0 -type d)/lib/obs-plugins/*.so ~/.config/obs-studio/plugins/.
  ln -fs $(find /nix/store/*$i* -maxdepth 0 -type d)/lib/obs-plugins/*.so ~/.config/obs-studio/plugins/$i/bin/64bit/.
done
find $plugins
obs

any suggestions?