ae2dc6aea6
GitOrigin-RevId: 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0
49 lines
847 B
Nix
49 lines
847 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.programs.immersed;
|
|
in
|
|
{
|
|
imports = [
|
|
(lib.mkRenamedOptionModule
|
|
[
|
|
"programs"
|
|
"immersed-vr"
|
|
]
|
|
[
|
|
"programs"
|
|
"immersed"
|
|
]
|
|
)
|
|
];
|
|
|
|
options = {
|
|
programs.immersed = {
|
|
enable = lib.mkEnableOption "immersed";
|
|
|
|
package = lib.mkPackageOption pkgs "immersed" { };
|
|
};
|
|
};
|
|
|
|
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.meta.maintainers;
|
|
}
|