diff --git a/hosts/pulsebert/default.nix b/hosts/pulsebert/default.nix index 4bf557b7..2bfb271b 100644 --- a/hosts/pulsebert/default.nix +++ b/hosts/pulsebert/default.nix @@ -6,7 +6,6 @@ let octoprintPort = 8080; - espCam = "http://172.20.78.164:81"; in { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix @@ -198,9 +197,15 @@ in { Restart = "always"; RestartSec = 60; }; - script = "exec ${mjpeg-proxy}/bin/rust-mjpeg-proxy ${espCam}/stream"; + script = "exec ${mjpeg-proxy}/bin/rust-mjpeg-proxy http://localhost:3020/?action=stream"; }; + services.mjpg-streamer = { + enable = true; + inputPlugin = "input_uvc.so -d /dev/v4l/by-id/usb-046d_0817_4B7115A0-video-index0 -r 640x480 -f 30 -pl 50hz -ex auto"; + outputPlugin = "output_http.so -p 3020"; + }; + # Allow gpio group to access GPIO devices users.groups.gpio = { }; services.udev.extraRules = '' @@ -216,4 +221,3 @@ in { system.stateVersion = "20.09"; # Did you read the comment? } -