From e3d4144cf9b17424d8c684ccd9c94b67f7e7e203 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Wed, 6 Apr 2022 12:35:39 -0700 Subject: refactor grafana as a module --- hosts/common/server/grafana.nix | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 hosts/common/server/grafana.nix (limited to 'hosts/common/server/grafana.nix') diff --git a/hosts/common/server/grafana.nix b/hosts/common/server/grafana.nix deleted file mode 100644 index 474c4e2..0000000 --- a/hosts/common/server/grafana.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - services.grafana = { - enable = true; - # Bind to all interfaces. - addr = ""; - security.adminUser = "fcuny"; - - analytics.reporting.enable = false; - - provision = { - enable = true; - datasources = [{ - name = "prometheus"; - type = "prometheus"; - isDefault = true; - url = "http://localhost:9090"; - }]; - dashboards = [{ - disableDeletion = true; - options.path = ./dashboards; - }]; - }; - }; - - age.secrets.restic-repo-systems.file = - ../../../secrets/restic/repo-systems.age; - - services.restic.backups = { - grafana = { - paths = [ "/var/lib/grafana/data" ]; - repository = "/data/slow/backups/systems"; - passwordFile = config.age.secrets.restic-repo-systems.path; - timerConfig = { OnCalendar = "00:05"; }; - initialize = true; - extraBackupArgs = [ "--tag grafana" ]; - pruneOpts = [ "--keep-daily 7" "--keep-weekly 4" ]; - }; - }; -} -- cgit v1.2.3