From fc1d77439c34d7ff03627af01b4ff4d9f2a1c6f0 Mon Sep 17 00:00:00 2001
From: makefu <github@syntax-fehler.de>
Date: Sun, 3 Sep 2023 14:23:24 +0200
Subject: [PATCH] 3dprint: load different web cam

---
 2configs/home/3dprint.nix | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/2configs/home/3dprint.nix b/2configs/home/3dprint.nix
index aac9627..a6297a7 100644
--- a/2configs/home/3dprint.nix
+++ b/2configs/home/3dprint.nix
@@ -1,19 +1,24 @@
 { pkgs, ... }:
 let
   #dev = "/dev/web_cam";
-  dev = "/dev/video0";
+  dev = "/dev/web_cam";
 in
 {
   services.mjpg-streamer = {
     enable = true;
-    inputPlugin = "input_uvc.so -d ${dev} -r 1280x960";
+    # new camera
+    #inputPlugin = "input_uvc.so -d ${dev} -r 1280x960";
+    # ps eye came
+    inputPlugin = "input_uvc.so -y -d ${dev} -r 640x480";
   };
   users.users.octoprint.extraGroups = [ "video" ];
+
   # allow octoprint to access /dev/vchiq
   # also ensure that the webcam always comes up under the same name
   services.udev.extraRules = ''
     SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"
     KERNEL=="video*",ATTRS{vendor}=="0x046d", ATTRS{device}=="0x0825", GROUP="video", SYMLINK+="web_cam"
+    KERNEL=="video*",ATTRS{vendor}=="0x1415", ATTRS{device}=="0x2000", GROUP="video", SYMLINK+="web_cam"
   '';
   systemd.services.octoprint = {
     path = [ pkgs.libraspberrypi ];