mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-23 16:29:42 -04:00
added frigate service module
This commit is contained in:
parent
608783b10c
commit
bc7fcae70c
1 changed files with 68 additions and 0 deletions
68
src/system/modules/frigate/default.nix
Normal file
68
src/system/modules/frigate/default.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.frigate;
|
||||
nginx = config.modules.system.nginx;
|
||||
|
||||
in
|
||||
{ options.modules.system.frigate = { enable = mkEnableOption "Enable Frigate NVR"; };
|
||||
config = mkIf cfg.enable {
|
||||
services.frigate = {
|
||||
enable = true;
|
||||
hostname = "frigate";
|
||||
settings = {
|
||||
mqtt = {
|
||||
enabled = true;
|
||||
host = "localhost";
|
||||
};
|
||||
cameras = {
|
||||
"Doorbell" = {
|
||||
ffpmeg.inputs = [
|
||||
{
|
||||
path = "rtsp://admin:th3bigbl4ck@192.168.0.108/cam/realmonitor?channel=1&subtype=0";
|
||||
roles = [ "detect" "record" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
"Living Room" = {
|
||||
ffpmeg.inputs = [
|
||||
{
|
||||
path = "rtsp://admin:th3bigbl4ck@192.168.0.181/cam/realmonitor?channel=1&subtype=0";
|
||||
roles = [ "detect" "record" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
"Kitchen" = {
|
||||
ffpmeg.inputs = [
|
||||
{
|
||||
path = "rtsp://admin:th3bigbl4ck@192.168.0.181/cam/realmonitor?channel=2&subtype=0";
|
||||
roles = [ "detect" "record" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
"Parking Lot" = {
|
||||
ffpmeg.inputs = [
|
||||
{
|
||||
path = "rtsp://admin:th3bigbl4ck@192.168.0.59/cam/realmonitor?channel=1&subtype=0";
|
||||
roles = [ "detect" "record" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
"Porch" = {
|
||||
ffpmeg.inputs = [
|
||||
{
|
||||
path = "rtsp://admin:th3bigbl4ck@192.168.0.108/cam/realmonitor?channel=1&subtype=0";
|
||||
roles = [ "detect" "record" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue