M hosts/alice/default.nix => hosts/alice/default.nix +5 -0
@@ 57,4 57,9 @@
lutris.enable = true;
steam.enable = true;
};
+
+ roles.obs = {
+ enable = true;
+ enableVirtualCamera = true;
+ };
}
M roles/default.nix => roles/default.nix +1 -0
@@ 12,6 12,7 @@
./hyprland.nix
./kitty.nix
./nix.nix
+ ./obs.nix
./plasma.nix
./prometheus.nix
./qutebrowser.nix
A roles/obs.nix => roles/obs.nix +25 -0
@@ 0,0 1,25 @@
+{
+ config,
+ lib,
+ ...
+}: let
+ cfg = config.roles.obs;
+in {
+ options.roles.obs = {
+ enable = lib.mkEnableOption "OBS Studio";
+ enableVirtualCamera = lib.mkEnableOption "OBS virtual camera"; # TODO: implement lol
+ };
+
+ config = lib.mkIf cfg.enable {
+ hm.programs.obs-studio = {
+ enable = true;
+ };
+
+ boot.extraModulePackages = [
+ config.boot.kernelPackages.v4l2loopback
+ ];
+ boot.extraModprobeConfig = ''
+ options v4l2loopback devices=1 video_nr=1 card_label="OBS virtual camera" exclusive_caps=1
+ '';
+ };
+}