From 4f7e50243d1f8ed025705db2f57e32647923486f Mon Sep 17 00:00:00 2001 From: David Wagner Date: Thu, 7 Dec 2023 16:12:15 +0100 Subject: [PATCH] rp3: Install mjpg-streamer --- host-rp3.nix | 1 + modules/camera.nix | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 modules/camera.nix diff --git a/host-rp3.nix b/host-rp3.nix index d3ad31d..f406126 100644 --- a/host-rp3.nix +++ b/host-rp3.nix @@ -3,6 +3,7 @@ { imports = [ ./hardware/rp3.nix + ./modules/camera.nix ./modules/common.nix ./modules/cachix.nix ./modules/remote-builder diff --git a/modules/camera.nix b/modules/camera.nix new file mode 100644 index 0000000..a0a812f --- /dev/null +++ b/modules/camera.nix @@ -0,0 +1,7 @@ +{ config, ... }: + +{ + services.mjpg-streamer.enable = true; + services.mjpg-streamer.inputPlugin = "input_uvc.so -vf true"; + networking.firewall.allowedTCPPorts = [ 5050 ]; +}