Added mail notifications on failure. Needs more work on lib.nix and the services/*.nix.
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
# Version tagging
|
||||
frigateVersion = "0.16.4";
|
||||
# Helper
|
||||
helper = import ./lib.nix { inherit config pkgs lib; };
|
||||
cfg = config.numbus.services.frigate;
|
||||
in
|
||||
@@ -15,6 +17,7 @@ helper.mkPodmanService {
|
||||
defaultPort = "8971";
|
||||
scheme = "https";
|
||||
dependencies = [ "traefik.service" "${config.numbus.services.dns}.service" "home-assistant.service" ];
|
||||
envFile = "/var/lib/numbus-server/home-assistant/.env";
|
||||
|
||||
extraOptions = {
|
||||
devices = mkOption {
|
||||
@@ -45,8 +48,8 @@ helper.mkPodmanService {
|
||||
tmpfs:
|
||||
size: 1000000000
|
||||
environment:
|
||||
- FRIGATE_MQTT_USER=$FRIGATE_MQTT_USER
|
||||
- FRIGATE_MQTT_PASSWORD=$FRIGATE_MQTT_PASSWORD
|
||||
- FRIGATE_MQTT_USER=$HOME_ASSISTANT_MQTT_USER
|
||||
- FRIGATE_MQTT_PASSWORD=$HOME_ASSISTANT_MQTT_PASSWORD
|
||||
${lib.optionalString (cfg.devices != []) ''
|
||||
devices:
|
||||
${lib.concatStringsSep "\n" (map (d: " - \"${d}\"") cfg.devices)}
|
||||
|
||||
Reference in New Issue
Block a user