From d68721b710bafc912cd51a779c389756058b8752 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Mon, 11 Dec 2023 17:05:10 +0100 Subject: [PATCH] add obs --- flake.nix | 1 + modules/graphical/hyprland.nix | 2 +- modules/graphical/obs.nix | 15 +++++++++++++++ modules/graphical/shared.nix | 5 ----- 4 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 modules/graphical/obs.nix diff --git a/flake.nix b/flake.nix index b5ae866..d55a344 100644 --- a/flake.nix +++ b/flake.nix @@ -103,6 +103,7 @@ ./modules/graphical/hyprland.nix ./modules/graphical/emulators.nix ./modules/graphical/gamemode.nix + ./modules/graphical/obs.nix ./modules/graphical/shared.nix ./modules/hardware/nvidia.nix ./modules/hardware/ssd.nix diff --git a/modules/graphical/hyprland.nix b/modules/graphical/hyprland.nix index 4bb3ede..268acd6 100644 --- a/modules/graphical/hyprland.nix +++ b/modules/graphical/hyprland.nix @@ -203,7 +203,7 @@ in "$mainMod, E, exec, ${thunar}" "$mainMod, V, togglefloating" "$mainMod, I, exec, ${rofi} -show drun -show-icons" - "$mainMod, S, exec, cat ~/songs | shuf -n 0 | sed \"s/^/b\.p /g\" | ${wl-copy}" + "$mainMod, S, exec, cat ~/songs | shuf -n 1 | sed \"s/^/b\.p /g\" | ${wl-copy}" "$mainMod, R, exec, ${swww} img $(ls -d ~/Nextcloud/dinge/Bg/* | shuf -n 1)" " , Print, exec, ${grim} -g \"$(${slurp} -d)\" - | ${wl-copy}" "ALT, SPACE, exec, ${rofi} -show combi" diff --git a/modules/graphical/obs.nix b/modules/graphical/obs.nix new file mode 100644 index 0000000..1bf4202 --- /dev/null +++ b/modules/graphical/obs.nix @@ -0,0 +1,15 @@ +{ config, pkgs, ...}: +{ + boot = { + kernelModules = ["v4l2loopback"]; # Autostart kernel modules on boot + extraModulePackages = with config.boot.kernelPackages; [v4l2loopback]; # loopback module to make OBS virtual camera work + }; + + environment.systemPackages = with pkgs; [ + (wrapOBS { + plugins = with obs-studio-plugins; [ + obs-pipewire-audio-capture + ]; + }) + ]; +} diff --git a/modules/graphical/shared.nix b/modules/graphical/shared.nix index 3c21dc2..6ef0828 100644 --- a/modules/graphical/shared.nix +++ b/modules/graphical/shared.nix @@ -64,11 +64,6 @@ in brightnessctl wacomtablet osu-lazer-bin - (wrapOBS { - plugins = with obs-studio-plugins; [ - obs-pipewire-audio-capture - ]; - }) ]; #environment.sessionVariables = {