Skip to content

Commit

Permalink
[obs] add as a module
Browse files Browse the repository at this point in the history
  • Loading branch information
ejiek committed Nov 7, 2023
1 parent 58c96a7 commit 12248c4
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
1 change: 0 additions & 1 deletion hosts/ePower/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
mattermost-desktop
mpv
nodejs
obs-studio
pandoc
pulumi-bin
tdesktop
Expand Down
1 change: 1 addition & 0 deletions hosts/ePower/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
joshuto.enable = true;
nvim.enable = true;
nu.enable = true;
obs.enable = true;
obsidian.enable = true;
opentabletdriver.enable = true;
pass.enable = true;
Expand Down
1 change: 1 addition & 0 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
./networking
./nu
./nvim
./obs
./obsidian
./opentabletdriver
./pass
Expand Down
32 changes: 32 additions & 0 deletions modules/obs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{ config, lib, pkgs, ... }:
let inherit (lib) types mkIf mkDefault mkOption;
in {
options.my-config = {
obs.enable = mkOption {
description = "Enable my obs config";
type = types.bool;
default = false;
};
};

config = mkIf config.my-config.obs.enable {
boot.extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
boot.extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
'';
security.polkit.enable = true;

home-manager.users.ejiek = {
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-backgroundremoval
obs-pipewire-audio-capture
];
};
};
};
}

0 comments on commit 12248c4

Please sign in to comment.