me like nix
0

Configure Feed

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

add frigate to HA

author
Sean Aye
date (Mar 22, 2026, 8:03 PM -0400) commit e730fdd0 parent 41ca9e0d change-id roprttmq
+78 -1
+78 -1
hosts/mira/configuration.nix
··· 129 129 }; 130 130 }; 131 131 132 - # MQTT broker for Home Assistant (Tasmota devices) 132 + # MQTT broker for Home Assistant (Tasmota devices, Frigate) 133 133 services.mosquitto = { 134 134 enable = true; 135 135 listeners = [ ··· 141 141 ]; 142 142 }; 143 143 144 + # Frigate NVR for camera recording and AI object detection 145 + services.frigate = { 146 + enable = true; 147 + hostname = "frigate"; 148 + settings = { 149 + mqtt = { 150 + enabled = true; 151 + host = "localhost"; 152 + port = 1883; 153 + }; 154 + 155 + # Detector configuration - CPU for now (can add GPU later) 156 + detectors = { 157 + cpu = { 158 + type = "cpu"; 159 + num_threads = 4; 160 + }; 161 + }; 162 + 163 + # Camera configuration - Pi Camera via go2rtc 164 + cameras = { 165 + picam = { 166 + enabled = true; 167 + ffmpeg = { 168 + inputs = [ 169 + { 170 + path = "rtsp://pi:8554/picam"; 171 + roles = [ "detect" "record" ]; 172 + } 173 + ]; 174 + }; 175 + detect = { 176 + enabled = true; 177 + width = 1920; 178 + height = 1080; 179 + fps = 5; # Lower FPS for detection to reduce CPU 180 + }; 181 + record = { 182 + enabled = true; 183 + retain = { 184 + days = 7; 185 + mode = "motion"; # Only keep motion events 186 + }; 187 + events = { 188 + retain = { 189 + default = 14; # Keep events for 14 days 190 + mode = "active_objects"; 191 + }; 192 + }; 193 + }; 194 + snapshots = { 195 + enabled = true; 196 + bounding_box = true; 197 + retain = { 198 + default = 14; 199 + }; 200 + }; 201 + objects = { 202 + track = [ "person" "dog" "cat" "car" ]; 203 + }; 204 + }; 205 + }; 206 + 207 + # Recording storage 208 + record = { 209 + enabled = true; 210 + retain = { 211 + days = 7; 212 + mode = "motion"; 213 + }; 214 + }; 215 + }; 216 + }; 217 + 144 218 # Home Assistant service 145 219 services.home-assistant = { 146 220 enable = true; ··· 159 233 "ibeacon" # Was missing ibeacon_ble module 160 234 "go2rtc" # Camera streaming 161 235 "generic" # Generic camera integration 236 + "frigate" # Frigate NVR integration 162 237 ]; 163 238 config = { 164 239 homeassistant = { ··· 265 340 3000 # vite dev port 266 341 1883 # MQTT for Tasmota devices 267 342 2300 # trmnl 343 + 5000 # Frigate web UI 344 + 8971 # Frigate API 268 345 config.services.home-assistant.config.http.server_port 269 346 ]; 270 347 networking.firewall.allowedUDPPorts = [