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