This commit is contained in:
soraefir
2026-06-07 16:21:21 +02:00
parent 649b7cc032
commit 8569c40183
24 changed files with 129 additions and 108 deletions

View File

@@ -32,7 +32,7 @@ in {
runtime = {
paths = [
{
path = "${serverCfg.path.config}/frigate/";
path = "${serverCfg.path.config.path}/frigate/";
mode = "0755";
}
{
@@ -53,7 +53,7 @@ in {
overrides = {
cmd = [ ];
volumes = [
"${serverCfg.path.config}/frigate:/config"
"${serverCfg.path.config.path}/frigate:/config"
"/var/lib/frigate/storage:/media/frigate"
"/dev/bus/usb:/dev/bus/usb" # Passes Google Coral USB TPU to the container
"/dev/dri:/dev/dri" # Passes Intel/AMD GPU for hardware video decoding
@@ -66,12 +66,12 @@ in {
trigger = "server";
envFile = config.sops.secrets."FRIGATE_ENV".path;
script = pkgs.writeShellScript "setup-frigate" ''
mkdir -p "${serverCfg.path.config}/frigate"
mkdir -p "${serverCfg.path.config.path}/frigate"
mkdir -p "/var/lib/frigate/storage"
# Bootstrap a standard configuration layout if missing
if [ ! -f "${serverCfg.path.config}/frigate/config.yml" ]; then
cat <<EOF > "${serverCfg.path.config}/frigate/config.yml"
if [ ! -f "${serverCfg.path.config.path}/frigate/config.yml" ]; then
cat <<EOF > "${serverCfg.path.config.path}/frigate/config.yml"
mqtt:
enabled: False # Set to True and define host if connecting to Home Assistant