nixos-config/modules/backscrub/default.nix
Erwin Boskma 4cd0f83ce8
Some checks failed
/ check (push) Failing after 2m46s
Run nixfmt
2024-02-05 11:46:52 +01:00

31 lines
694 B
Nix

{
pkgs,
config,
lib,
...
}:
with lib;
let
cfg = config.eboskma.backscrub;
in
{
options.eboskma.backscrub = {
enable = mkEnableOption "enable v4l2loopback kernel module";
};
config = mkIf cfg.enable {
boot = {
extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
# Register a v4l2loopback device at boot
kernelModules = [ "v4l2loopback" ];
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 ];
};
}