aboutsummaryrefslogtreecommitdiff
path: root/hosts/common/server/grafana.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-06 12:35:39 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-06 12:35:39 -0700
commite3d4144cf9b17424d8c684ccd9c94b67f7e7e203 (patch)
tree9454aa88f4929473cbe595c4161aefc30dcfd12b /hosts/common/server/grafana.nix
parentrefactor prometheus as a module (diff)
downloadinfra-e3d4144cf9b17424d8c684ccd9c94b67f7e7e203.tar.gz
refactor grafana as a module
Diffstat (limited to 'hosts/common/server/grafana.nix')
-rw-r--r--hosts/common/server/grafana.nix41
1 files changed, 0 insertions, 41 deletions
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" ];
- };
- };
-}