aboutsummaryrefslogblamecommitdiff
path: root/hosts/common/server/grafana.nix
blob: 17e6c0eb0807832bbac0f60fa4265f6b04733684 (plain) (tree)
1
2
3
4
5
6
7
8
9


                           
                      


                             

                                 







                                      



                                    
      

    
{ config, lib, pkgs, ... }:

{
  services.grafana = {
    enable = true;
    # Bind to all interfaces.
    addr = "";
    security.adminUser = "fcuny";

    provision = {
      enable = true;
      datasources = [{
        name = "prometheus";
        type = "prometheus";
        isDefault = true;
        url = "http://localhost:9090";
      }];
      dashboards = [{
        disableDeletion = true;
        options.path = ./dashboards;
      }];
    };
  };
}