From f24e6d6700f3b1460f7d8257b70431e8fde7ad7a Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 25 Feb 2021 17:50:15 +0100 Subject: [PATCH] pulsebert: remove mjpeg-proxy --- hosts/pulsebert/default.nix | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/hosts/pulsebert/default.nix b/hosts/pulsebert/default.nix index 2bfb271b..c7bddccc 100644 --- a/hosts/pulsebert/default.nix +++ b/hosts/pulsebert/default.nix @@ -145,11 +145,11 @@ in { ''; }; locations."/cam/stream" = { - proxyPass = "http://localhost:3030/stream.mjpeg"; + proxyPass = "http://localhost:3020/?action=stream"; extraConfig = "proxy_pass_request_headers off;"; }; locations."/cam/capture" = { - proxyPass = "http://localhost:3030/capture.jpg"; + proxyPass = "http://localhost:3020/?action=snapshot"; extraConfig = "proxy_pass_request_headers off;"; }; }; @@ -158,10 +158,10 @@ in { services.octoprint = rec { enable = true; port = octoprintPort; - # extraConfig.webcam = { - # snapshot = "http://localhost:5050?action=snapshot"; - # stream = "http://octoprint.local:5050?action=stream"; - # }; + extraConfig.webcam = { + snapshot = "http://localhost:3020?action=snapshot"; + stream = "https://drkkr.hq.c3d2.de/cam/stream"; + }; # plugins = let # python = pkgs.octoprint.python; @@ -186,20 +186,6 @@ in { users.users.${config.services.octoprint.user}.extraGroups = [ "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 = { 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";