mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
cache in ram
This commit is contained in:
parent
80736f1a40
commit
5ace95d238
1 changed files with 11 additions and 16 deletions
|
|
@ -83,7 +83,7 @@ in
|
||||||
ffmpeg.inputs = [
|
ffmpeg.inputs = [
|
||||||
{
|
{
|
||||||
path = "rtsp://127.0.0.1:8554/parking_lot";
|
path = "rtsp://127.0.0.1:8554/parking_lot";
|
||||||
roles = [ "record" ];
|
roles = [ "record" "live" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
path = "rtsp://127.0.0.1:8554/parking_lot_sub";
|
path = "rtsp://127.0.0.1:8554/parking_lot_sub";
|
||||||
|
|
@ -115,26 +115,21 @@ in
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Bind mount caches into the 3TB frigate LVM volume
|
# Frigate segment cache in RAM (reduces disk writes)
|
||||||
|
fileSystems."/var/cache/frigate" = {
|
||||||
|
device = "tmpfs";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
options = [ "size=512M" "mode=0755" ];
|
||||||
|
};
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d /var/lib/frigate/cache 0750 frigate frigate -"
|
# Set ownership after tmpfs mount
|
||||||
"d /var/lib/frigate/nginx-cache 0750 nginx nginx -"
|
"d /var/cache/frigate 0750 frigate frigate -"
|
||||||
];
|
];
|
||||||
|
|
||||||
fileSystems."/var/cache/frigate" = {
|
# Backup recordings/database
|
||||||
device = "/var/lib/frigate/cache";
|
|
||||||
options = [ "bind" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/var/cache/nginx/frigate" = {
|
|
||||||
device = "/var/lib/frigate/nginx-cache";
|
|
||||||
options = [ "bind" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Backup recordings/database, exclude caches
|
|
||||||
modules.system.backup = {
|
modules.system.backup = {
|
||||||
paths = [ "/var/lib/frigate" ];
|
paths = [ "/var/lib/frigate" ];
|
||||||
exclude = [ "*/cache" "*/nginx-cache" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue