nix-config/modules/canon_eos_550d.nix

26 lines
619 B
Nix
Raw Normal View History

2025-05-03 13:19:50 +02:00
{ pkgs, ... }:
{
services.udev.extraRules = ''
ACTION=="add", \
SUBSYSTEM=="usb", \
ATTR{idVendor}=="04a9", \
ATTR{idProduct}=="31ea", \
'';
# RUN+="systemctl restart webcam"
systemd.services.webcam = {
enable = true;
script = ''
${pkgs.gphoto2}/bin/gphoto2 --stdout --capture-movie |
${pkgs.ffmpeg}/bin/ffmpeg \
-i - \
-vcodec rawvideo \
-pix_fmt yuv420p \
-f v4l2 \
/dev/video0
'';
#wantedBy = [ "multi-user.target" ];
};
}