feat(eientei): add frigate
This commit is contained in:
parent
28b68562fc
commit
8e935ab6aa
2 changed files with 43 additions and 0 deletions
30
spec/eientei/frigate.nix
Normal file
30
spec/eientei/frigate.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ pkgs
|
||||
, config
|
||||
, ...}: {
|
||||
# container image used for edgetpu support
|
||||
virtualisation.oci-containers.containers.frigate = {
|
||||
extraOptions = [
|
||||
"--privileged"
|
||||
"--shm-size=128mb"
|
||||
"--device=/dev/bus/usb:/dev/bus/usb"
|
||||
];
|
||||
image = "ghcr.io/blakeblackshear/frigate:stable";
|
||||
volumes = [
|
||||
"/etc/localtime:/etc/localtime:ro"
|
||||
"/nix/persist/service/frigate/config:/config"
|
||||
"/nix/persist/service/frigate/data:/media/frigate"
|
||||
#"/tmp/frigate:/tmp/cache"
|
||||
];
|
||||
ports = [
|
||||
"5000:5000"
|
||||
"8554:8554" # RTSP feeds
|
||||
"8555:8555/tcp" # WebRTC over tcp
|
||||
"8555:8555/udp" # WebRTC over udp
|
||||
];
|
||||
};
|
||||
|
||||
networking.firewall.interfaces.enp0s20f0u1.allowedTCPPorts = [ 5000 8554 8555 ];
|
||||
networking.firewall.interfaces.enp0s20f0u1.allowedUDPPorts = [ 8555 ];
|
||||
|
||||
global.fs.zfs.mountpoints."/nix/persist/service/frigate" = "service/frigate";
|
||||
}
|
13
spec/eientei/mosquitto.nix
Normal file
13
spec/eientei/mosquitto.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
services.mosquitto = {
|
||||
enable = true;
|
||||
listeners = [ {
|
||||
users.frigate = {
|
||||
acl = [ "readwrite #" ];
|
||||
hashedPassword = "$7$101$Zt3Me3AkHbrKBbbI$SsLTGeTwtkFGXS2F1/S3Vg6w7TcgMLU037ttedKaw/Ela0wgqbaAVxecK1j5i5TDw9OjZMkNI9mUzz9l0d7vcg==";
|
||||
};
|
||||
} ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 1883 ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue