From 1517e6a14b916fcce85972aeb3480742c2d5e239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=83=D1=85=D0=B0=D1=80=D0=B8=D0=BA?= <65870+suhr@users.noreply.github.com> Date: Mon, 5 Apr 2021 22:32:21 +0300 Subject: [PATCH] nixos/droidcam: init (#109267) Co-authored-by: Pascal Bach --- nixos/modules/module-list.nix | 1 + nixos/modules/programs/droidcam.nix | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 nixos/modules/programs/droidcam.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index e113322123ed..a4f1ad5b470d 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -126,6 +126,7 @@ ./programs/dconf.nix ./programs/digitalbitbox/default.nix ./programs/dmrconfig.nix + ./programs/droidcam.nix ./programs/environment.nix ./programs/evince.nix ./programs/file-roller.nix diff --git a/nixos/modules/programs/droidcam.nix b/nixos/modules/programs/droidcam.nix new file mode 100644 index 000000000000..9843a1f5be25 --- /dev/null +++ b/nixos/modules/programs/droidcam.nix @@ -0,0 +1,16 @@ +{ lib, pkgs, config, ... }: + +with lib; + +{ + options.programs.droidcam = { + enable = mkEnableOption "DroidCam client"; + }; + + config = lib.mkIf config.programs.droidcam.enable { + environment.systemPackages = [ pkgs.droidcam ]; + + boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ]; + boot.kernelModules = [ "v4l2loopback" "snd-aloop" ]; + }; +}