summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack/grafana.nix
blob: adf0a4bc3bd68f77116c838f218365e986c5741e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
let
  port = 3000;
in {

  networking.firewall.allowedTCPPorts = [ port ]; # legacy
  services.nginx.virtualHosts."grafana.shack" = {
    locations."/".proxyPass = "http://localhost:${toString port}";
  };
  services.grafana = {
    enable = true;
    port = port;
    addr = "0.0.0.0";
    users.allowSignUp = true;
    users.allowOrgCreate = true;
    users.autoAssignOrg = true;
    auth.anonymous.enable = true;
    security = import <secrets/grafana_security.nix>;
  };
}