Changed: Programms

This commit is contained in:
2025-05-03 13:19:50 +02:00
parent c65ea98734
commit 81c0da4b6c
12 changed files with 104 additions and 71 deletions

View File

@@ -0,0 +1,25 @@
{ 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" ];
};
}

View File

@@ -1,13 +0,0 @@
{ pkgs, ...}:
{
environment.systemPackages = with pkgs; [
(python3.withPackages (python-pkgs: with python-pkgs; [
pandas
requests
numpy
scipy
]))
];
}

4
modules/start-webcam.nix Normal file
View File

@@ -0,0 +1,4 @@
with import <nixpkgs> { };
writeShellScriptBin = "start-webcam" ''
systemctl restart webcam
'';

View File

@@ -32,7 +32,9 @@
pciutils # lspci
usbutils # lsusb
lshw
nvme-cli
smartmontools
# Graphics
libGL
glxinfo