me like nix
0

Configure Feed

Select the types of activity you want to include in your feed.

1{ pkgs, lib, config, ... }: 2 3{ 4 imports = [ ../pi-common ]; 5 6 networking.hostName = "pizero"; 7 8 # Pi Zero 2 W specific settings (512MB RAM, BCM2837 SoC) 9 pi = { 10 streamName = "pizerocam"; 11 resolution = { width = 1280; height = 720; }; 12 framerate = 15; 13 deviceTreeFilter = "bcm2837-rpi-zero-2-w.dtb"; 14 deviceTreeCompatible = "brcm,bcm2837"; 15 gpuMem = 128; 16 flipCamera = true; 17 }; 18 19 # Use RPi kernel which includes IMX708 camera driver (not in default kernel) 20 boot.kernelPackages = pkgs.linuxPackages_rpi3; 21 22 # Mainline kernel's BCM2837 DTB lacks RPi-specific labels (i2c0if, cam1_clk, etc.) 23 # needed by the camera overlay. Disable NixOS DTB so U-Boot uses the firmware's 24 # DTB (which has all RPi labels and the imx708 overlay applied via config.txt). 25 hardware.deviceTree.enable = lib.mkForce false; 26 sdImage.populateFirmwareCommands = lib.mkAfter '' 27 chmod u+w ./firmware/config.txt 28 echo "dtoverlay=imx708" >> ./firmware/config.txt 29 echo "camera_auto_detect=1" >> ./firmware/config.txt 30 ''; 31 32 system.stateVersion = "24.11"; 33}