nixos/immersed-vr: init module

This commit is contained in:
Gavin John 2024-07-11 16:59:15 -04:00 committed by Gavin John
parent 82816bac61
commit f73ef07680
2 changed files with 35 additions and 0 deletions

View File

@ -213,6 +213,7 @@
./programs/iay.nix
./programs/iftop.nix
./programs/i3lock.nix
./programs/immersed-vr.nix
./programs/iotop.nix
./programs/java.nix
./programs/joycond-cemuhook.nix

View File

@ -0,0 +1,34 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.programs.immersed-vr;
in
{
options = {
programs.immersed-vr = {
enable = lib.mkEnableOption "immersed-vr";
package = lib.mkPackageOption pkgs "immersed-vr" {};
};
};
config = lib.mkIf cfg.enable {
boot = {
kernelModules = [ "v4l2loopback" "snd-aloop" ];
extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
extraModprobeConfig = ''
options v4l2loopback exclusive_caps=1 card_label="v4l2loopback Virtual Camera"
'';
};
environment.systemPackages = [ cfg.package ];
};
meta.maintainers = pkgs.immersed-vr.meta.maintainers;
}