50 lines
1017 B
Nix
50 lines
1017 B
Nix
{ config, lib, pkgs, ... }:
|
|
{
|
|
fileSystems = {
|
|
"/var/lib/frigate" = {
|
|
device = "/tank/nvr/frigate";
|
|
depends = [ "/tank/nvr/frigate" ];
|
|
options = [ "bind" ];
|
|
};
|
|
};
|
|
|
|
services.frigate = {
|
|
enable = true;
|
|
hostname = "frigate.home.feal.no";
|
|
vaapiDriver = "nvidia";
|
|
checkConfig = false;
|
|
settings = {
|
|
# auth.reset_admin_password = true;
|
|
motion.enabled = true;
|
|
record.enabled = true;
|
|
# snapshots.enabled = true;
|
|
# detect = {
|
|
# enabled = true;
|
|
# fps = 5;
|
|
# };
|
|
|
|
cameras = {
|
|
driveway = {
|
|
ffmpeg.inputs = [
|
|
{
|
|
path = "rtsp://admin:placeholder@192.168.10.40/streaming/channels/101";
|
|
roles = [
|
|
"detect"
|
|
"record"
|
|
];
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
systemd.services.frigate.serviceConfig = {
|
|
# Allow GPU use
|
|
PrivateDevices = false;
|
|
|
|
# Allow cpuinfo
|
|
ProcSubset = "all";
|
|
};
|
|
}
|