grafana: resolve deprecations, migrate to unix socket
Martin Weinelt committed
May 21, 2024 at 20:43 UTC
431a46df627814f6c8f3a41298cb0d5ebbea6f60
2 files changed
+17
-6
delft/pluto/grafana.nix
+13
-5
@@ -5,10 +5,18 @@
5
6
services.grafana = {
7
enable = true;
8
- auth.anonymous.enable = true;
9
- users.allowSignUp = true;
10
- addr = "0.0.0.0";
11
- domain = "grafana.nixos.org";
12
- rootUrl = "https://grafana.nixos.org";
8
+ settings = {
9
+ "auth.anonymous".enabled = true;
10
+ users.allow_sign_up = true;
11
+ server = {
12
+ domain = "grafana.nixos.org";
13
+ root_url = "https://grafana.nixos.org";
14
+ protocol = "socket";
15
+ };
16
+ };
17
};
18
+
19
+ systemd.services.nginx.serviceConfig.SupplementaryGroups = [
20
+ "grafana"
21
+ ];
22
}
delft/pluto/nginx.nix
+4
-1
@@ -39,7 +39,10 @@
39
virtualHosts."grafana.nixos.org" = {
40
enableACME = true;
41
forceSSL = true;
42
- locations."/".proxyPass = "http://${config.services.grafana.addr}:${toString config.services.grafana.port}";
42
+ locations."/" = {
43
+ proxyPass = "http://unix:${config.services.grafana.settings.server.socket}";
44
+ proxyWebsockets = true;
45
+ };
46
};
47
};
48
}