diff --git a/hosts/containers/grafana/default.nix b/hosts/containers/grafana/default.nix index 03f1749c..f209bf74 100644 --- a/hosts/containers/grafana/default.nix +++ b/hosts/containers/grafana/default.nix @@ -1,6 +1,8 @@ { config, pkgs, lib, modulesPath, ... }: -{ +let + restartServices = [ "grafana" "influxdb" ]; +in { c3d2.isInHq = false; services.openssh.enable = true; @@ -64,6 +66,14 @@ }]; }; }; + systemd.services = builtins.foldl' (services: service: + services // { + "${service}".serviceConfig = { + RestartSec = 60; + Restart = "always"; + }; + } + ) {} restartServices; # This value determines the NixOS release with which your system is to be # compatible, in order to avoid breaking some software such as database