From 96e17a1bb14426f535e25fb40e5e1df5a2ed033a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 6 Dec 2023 23:42:13 +0100 Subject: [PATCH] grafana: add grafana group to nginx to access socket, remove ineffective overwrites --- hosts/grafana/default.nix | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/hosts/grafana/default.nix b/hosts/grafana/default.nix index 81395da2..1d36f660 100644 --- a/hosts/grafana/default.nix +++ b/hosts/grafana/default.nix @@ -112,22 +112,13 @@ }; }; - systemd.services = - builtins.foldl' - (services: service: - services // { - "${service}".serviceConfig = { - RestartSec = 60; - Restart = "always"; - }; - } - ) - { } [ "grafana" "influxdb" ] - // { - # work around our slow storage that can't keep up - influxdb.serviceConfig.LimitNOFILE = "1048576:1048576"; - influxdb.serviceConfig.TimeoutStartSec = "infinity"; - }; + systemd.services = { + # work around our slow storage that can't keep up + influxdb.serviceConfig.LimitNOFILE = "1048576:1048576"; + influxdb.serviceConfig.TimeoutStartSec = "infinity"; + }; system.stateVersion = "22.05"; + + users.users.nginx.extraGroups = [ "grafana" ]; }