grafana: set automatic Restart for grafana and influxdb

influxdb seems crashy like shit on our proxmox cluster. YOLO
This commit is contained in:
Astro 2021-11-07 03:39:30 +01:00
parent f2f4b89f43
commit 85c944e9ae
1 changed files with 11 additions and 1 deletions

View File

@ -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