This commit is contained in:
Bryan Ramos 2025-07-16 09:07:48 -04:00
parent beb00a5718
commit f1de6cf3ee
Signed by: bryan
GPG key ID: 6ABDCD144D6643C8
2 changed files with 68 additions and 38 deletions

View file

@ -8,6 +8,7 @@
system = {
nginx.enable = true;
forgejo.enable = true;
frigate.enable = true;
bitcoin = {
enable = true;
electrum.enable = true;
@ -124,9 +125,5 @@
keyFile = "/var/lib/sops-nix/key.txt";
generateKey = true;
};
secrets = {
camera_user = {};
camera_pass = {};
};
};
}

View file

@ -8,6 +8,13 @@ let
in
{ options.modules.system.frigate = { enable = mkEnableOption "Enable Frigate NVR"; };
config = mkIf cfg.enable {
sops = {
secrets = {
camera_user = {};
camera_pass = {};
};
};
services.frigate = {
enable = true;
hostname = "frigate";
@ -18,48 +25,74 @@ in
};
cameras = {
"Doorbell" = {
ffpmeg.inputs = [
{
path = "rtsp://$(cat /run/secrets/camera_user):$(cat /run/secrets/camera_pass)@192.168.0.108/cam/realmonitor?channel=1&subtype=0";
roles = [ "detect" "record" ];
}
];
ffmpeg = {
inputs = [
{
path = "rtsp://user:password@192.168.0.108/cam/realmonitor?channel=1&subtype=0";
roles = [ "record" ];
}
{
path = "rtsp://user:password@192.168.0.108/cam/realmonitor?channel=1&subtype=1";
roles = [ "detect" ];
}
];
};
};
"Living Room" = {
ffpmeg.inputs = [
{
path = "rtsp://admin:th3bigbl4ck@192.168.0.181/cam/realmonitor?channel=1&subtype=0";
roles = [ "detect" "record" ];
}
];
ffmpeg = {
inputs = [
{
path = "rtsp://user:password@192.168.0.181/cam/realmonitor?channel=1&subtype=0";
roles = [ "record" ];
}
{
path = "rtsp://user:password@192.168.0.181/cam/realmonitor?channel=1&subtype=1";
roles = [ "detect" ];
}
];
};
};
"Kitchen" = {
ffpmeg.inputs = [
{
path = "rtsp://admin:th3bigbl4ck@192.168.0.181/cam/realmonitor?channel=2&subtype=0";
roles = [ "detect" "record" ];
}
];
ffmpeg = {
inputs = [
{
path = "rtsp://user:password@192.168.0.181/cam/realmonitor?channel=2&subtype=0";
roles = [ "record" ];
}
{
path = "rtsp://user:password@192.168.0.181/cam/realmonitor?channel=2&subtype=1";
roles = [ "detect" ];
}
];
};
};
"Parking Lot" = {
ffpmeg.inputs = [
{
path = "rtsp://admin:th3bigbl4ck@192.168.0.59/cam/realmonitor?channel=1&subtype=0";
roles = [ "detect" "record" ];
}
];
ffmpeg = {
inputs = [
{
path = "rtsp://user:password@192.168.0.59/cam/realmonitor?channel=1&subtype=0";
roles = [ "record" ];
}
{
path = "rtsp://user:password@192.168.0.59/cam/realmonitor?channel=1&subtype=1";
roles = [ "detect" ];
}
];
};
};
"Porch" = {
ffpmeg.inputs = [
{
path = "rtsp://admin:th3bigbl4ck@192.168.0.108/cam/realmonitor?channel=1&subtype=0";
roles = [ "detect" "record" ];
}
];
ffmpeg = {
inputs = [
{
path = "rtsp://user:password@192.168.0.108/cam/realmonitor?channel=1&subtype=0";
roles = [ "record" ];
}
{
path = "rtsp://user:password@192.168.0.108/cam/realmonitor?channel=1&subtype=1";
roles = [ "detect" ];
}
];
};
};
};
};