Add skycam host
All checks were successful
Check flake / build-amd64-linux (push) Successful in 2m37s

This commit is contained in:
2024-08-03 20:11:11 +01:00
parent c589766673
commit f42442dd0e
5 changed files with 129 additions and 2 deletions

71
hosts/skycam/default.nix Normal file
View File

@ -0,0 +1,71 @@
{ config, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
../server.nix
];
hardware = {
raspberry-pi."4" = {
apply-overlays-dtmerge.enable = true;
audio.enable = false;
fkms-3d.enable = true; # VideoCore with 512 MB CMA reservation
tc358743.enable = true; # HDMI-to-CSI-2 converter
xhci.enable = false;
};
firmware = with pkgs; [
firmwareLinuxNonfree
wireless-regdb
];
};
networking = {
hostId = "731d1660";
firewall = {
enable = true;
allowedTCPPorts = [ 8080 ];
allowedUDPPorts = [ 8080 ];
};
};
systemd.services.ustreamer = {
enable = true;
description = "uStreamer service";
unitConfig = {
Type = "simple";
};
serviceConfig = {
ExecStartPre = ''${pkgs.v4l-utils}/bin/v4l2-ctl \
--device=/dev/video0 \
--fix-edid-checksums \
--info-edid
'';
ExecStart = ''${pkgs.unstable.ustreamer}/bin/ustreamer \
--device=/dev/video0 \
--resolution=1280x720 \
--format=uyvy \
--encoder=m2m-image \
--workers=3 \
--persistent \
--dv-timings \
--drop-same-frames=30 \
--host=0.0.0.0 \
--port=8080
'';
};
wantedBy = [ "network-online.target" ];
confinement.mode = "chroot-only";
};
environment.systemPackages = with pkgs; [
git
neovim
libraspberrypi
raspberrypi-eeprom
v4l-utils
unstable.ustreamer
];
system.stateVersion = "24.05";
}