Skyler Grey | a78aa67 | 2023-05-20 13:48:18 +0200 | [diff] [blame^] | 1 | { lib, config, ... }: { |
Skyler Grey | 6f0f43d | 2023-05-03 15:01:05 +0000 | [diff] [blame] | 2 | services.grafana = { |
| 3 | enable = true; |
| 4 | |
| 5 | settings = { |
| 6 | server = rec { |
| 7 | domain = "logs.clicks.codes"; |
Skyler Grey | a78aa67 | 2023-05-20 13:48:18 +0200 | [diff] [blame^] | 8 | root_url = "https://${domain}"; |
Skyler Grey | 6f0f43d | 2023-05-03 15:01:05 +0000 | [diff] [blame] | 9 | http_port = 9052; |
| 10 | enable_gzip = true; |
| 11 | }; |
| 12 | analytics.reporting_enabled = false; |
| 13 | }; |
Skyler Grey | a78aa67 | 2023-05-20 13:48:18 +0200 | [diff] [blame^] | 14 | |
| 15 | provision.datasources.settings.datasources = [{ |
| 16 | name = "clicks-postgresql"; |
| 17 | type = "postgres"; |
| 18 | access = "proxy"; |
| 19 | |
| 20 | url = "postgres://localhost:${toString config.services.postgresql.port}"; |
| 21 | user = "clicks_grafana"; |
| 22 | password = "$__file{${config.sops.secrets.clicks_grafana_db_password.path}}"; |
| 23 | # defined in postgres.nix |
| 24 | }]; |
Skyler Grey | 6f0f43d | 2023-05-03 15:01:05 +0000 | [diff] [blame] | 25 | }; |
| 26 | } |