nixos/grafana: allow @chown syscalls when using unix sockets

Grafana will unconditionally call chown on the socket after creating it,
even if the configuration does not ask for a different socket gid.

Changed files
+4 -1
nixos
modules
services
monitoring
+4 -1
nixos/modules/services/monitoring/grafana.nix
···
SystemCallArchitectures = "native";
# Upstream grafana is not setting SystemCallFilter for compatibility
# reasons, see https://github.com/grafana/grafana/pull/40176
-
SystemCallFilter = [ "@system-service" "~@privileged" ];
UMask = "0027";
};
preStart = ''
···
SystemCallArchitectures = "native";
# Upstream grafana is not setting SystemCallFilter for compatibility
# reasons, see https://github.com/grafana/grafana/pull/40176
+
SystemCallFilter = [
+
"@system-service"
+
"~@privileged"
+
] ++ lib.optional (cfg.settings.server.protocol == "socket") [ "@chown" ];
UMask = "0027";
};
preStart = ''