nixos-config/modules/backscrub/default.nix

31 lines
677 B
Nix
Raw Normal View History

{ pkgs
, config
, lib
, ...
2022-03-01 22:19:03 +01:00
}:
with lib; let
cfg = config.eboskma.backscrub;
in
{
2021-12-06 09:58:39 +01:00
options.eboskma.backscrub = {
enable = mkEnableOption "enable v4l2loopback kernel module";
};
2022-05-03 18:17:38 +02:00
config = mkIf cfg.enable {
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
2021-12-06 09:58:39 +01:00
# Register a v4l2loopback device at boot
boot.kernelModules = [
"v4l2loopback"
];
boot.extraModprobeConfig = ''
options v4l2loopback max_buffers=2
options v4l2loopback exclusive_caps=1
options v4l2loopback video_nr=10
options v4l2loopback card_label="VirtualCam"
'';
environment.systemPackages = with pkgs; [ backscrub ];
2021-12-06 09:58:39 +01:00
};
}