Correct configuration, frigate won't load

This commit is contained in:
niten 2025-03-25 12:03:15 -07:00
parent 1c34a4cd9d
commit 9cad0e9d8c

View File

@ -42,22 +42,22 @@ let
go2rtc.streams = mapAttrs' go2rtc.streams = mapAttrs'
(_: camOpts: nameValuePair camOpts.name [ camOpts.streams.low ]) (_: camOpts: nameValuePair camOpts.name [ camOpts.streams.low ])
cfg.cameras; cfg.cameras;
detectors = cfg.detectors; inherit (cfg) detectors;
record = { record = {
enabled = true; enabled = true;
retain = { retain = {
days = cfg.retention.default; days = cfg.retention.default;
mode = "motion"; mode = "active_objects";
}; };
detections.retain = { detections.retain = {
default = cfg.retention.events; default = cfg.retention.events;
mode = "motion"; mode = "active_objects";
objects = cfg.retention.objects; days = cfg.retention.detections;
}; };
alerts.retain = { alerts.retain = {
default = cfg.retention.events; default = cfg.retention.events;
mode = "motion"; mode = "motion";
objects = cfg.retention.objects; days = cfg.retention.alerts;
}; };
}; };
birdseye = { birdseye = {
@ -99,23 +99,19 @@ in {
default = mkOption { default = mkOption {
type = int; type = int;
description = "Retention time for all motion, in days."; description = "Retention time for all motion, in days.";
default = 7; default = 1;
}; };
events = mkOption { events = mkOption {
type = int; type = int;
description = "Retention time for all detected objects, in days."; description = "Retention time for all detected objects, in days.";
default = 14; default = 7;
}; };
objects = mkOption { alerts = mkOption {
type = attrsOf int; type = int;
description = "Map of object type to retention time in days."; description = "Retention time for all detected objects, in days.";
default = { default = 7;
person = 60;
dog = 30;
cat = 30;
};
}; };
}; };
@ -236,7 +232,7 @@ in {
"${cfg.state-directory}:/media/frigate" "${cfg.state-directory}:/media/frigate"
]; ];
# shm_size = cfg.shm-size; # shm_size = cfg.shm-size;
devices = cfg.devices; inherit (cfg) devices;
ports = [ ports = [
"${toString cfg.ports.frigate}:5000" "${toString cfg.ports.frigate}:5000"
"${toString cfg.ports.rtsp}:8554" "${toString cfg.ports.rtsp}:8554"