pulsebert: remove mjpeg-proxy

This commit is contained in:
Astro 2021-02-25 17:50:15 +01:00
parent b9a64af1b6
commit f24e6d6700
1 changed files with 6 additions and 20 deletions

View File

@ -145,11 +145,11 @@ in {
''; '';
}; };
locations."/cam/stream" = { locations."/cam/stream" = {
proxyPass = "http://localhost:3030/stream.mjpeg"; proxyPass = "http://localhost:3020/?action=stream";
extraConfig = "proxy_pass_request_headers off;"; extraConfig = "proxy_pass_request_headers off;";
}; };
locations."/cam/capture" = { locations."/cam/capture" = {
proxyPass = "http://localhost:3030/capture.jpg"; proxyPass = "http://localhost:3020/?action=snapshot";
extraConfig = "proxy_pass_request_headers off;"; extraConfig = "proxy_pass_request_headers off;";
}; };
}; };
@ -158,10 +158,10 @@ in {
services.octoprint = rec { services.octoprint = rec {
enable = true; enable = true;
port = octoprintPort; port = octoprintPort;
# extraConfig.webcam = { extraConfig.webcam = {
# snapshot = "http://localhost:5050?action=snapshot"; snapshot = "http://localhost:3020?action=snapshot";
# stream = "http://octoprint.local:5050?action=stream"; stream = "https://drkkr.hq.c3d2.de/cam/stream";
# }; };
# plugins = let # plugins = let
# python = pkgs.octoprint.python; # python = pkgs.octoprint.python;
@ -186,20 +186,6 @@ in {
users.users.${config.services.octoprint.user}.extraGroups = users.users.${config.services.octoprint.user}.extraGroups =
[ "dialout" "gpio" ]; [ "dialout" "gpio" ];
systemd.services.mjpeg-stream =
let mjpeg-proxy = pkgs.callPackage ../../lib/pkgs/mjpeg-proxy.nix { };
in {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
User = "nobody";
Group = "nogroup";
Restart = "always";
RestartSec = 60;
};
script = "exec ${mjpeg-proxy}/bin/rust-mjpeg-proxy http://localhost:3020/?action=stream";
};
services.mjpg-streamer = { services.mjpg-streamer = {
enable = true; 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"; inputPlugin = "input_uvc.so -d /dev/v4l/by-id/usb-046d_0817_4B7115A0-video-index0 -r 640x480 -f 30 -pl 50hz -ex auto";