summaryrefslogtreecommitdiff
path: root/hosts/vidhar/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-12-31 17:01:36 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2021-12-31 17:01:36 +0100
commit8deefff11f92dc28424580989193e09c61906151 (patch)
tree06605f31299ff0aad09ed8fdee052523ac9be598 /hosts/vidhar/default.nix
parente1483ff2214541c2ad3f2f99770ed41544bb8721 (diff)
downloadnixos-8deefff11f92dc28424580989193e09c61906151.tar
nixos-8deefff11f92dc28424580989193e09c61906151.tar.gz
nixos-8deefff11f92dc28424580989193e09c61906151.tar.bz2
nixos-8deefff11f92dc28424580989193e09c61906151.tar.xz
nixos-8deefff11f92dc28424580989193e09c61906151.zip
vidhar: grafana
Diffstat (limited to 'hosts/vidhar/default.nix')
-rw-r--r--hosts/vidhar/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix
index 29cd96db..ee67d254 100644
--- a/hosts/vidhar/default.nix
+++ b/hosts/vidhar/default.nix
@@ -119,5 +119,36 @@
119 119
120 cpuFreqGovernor = "schedutil"; 120 cpuFreqGovernor = "schedutil";
121 }; 121 };
122
123 services.nginx = {
124 enable = true;
125 upstreams.grafana = {
126 servers = { "unix:${config.services.grafana.socket}" = {}; };
127 };
128 virtualHosts = {
129 ${config.services.grafana.domain} = {
130 locations."/" = {
131 proxyPass = "http://grafana";
132 proxyWebsockets = true;
133 };
134 };
135 };
136 };
137 services.grafana = {
138 enable = true;
139 analytics.reporting.enable = false;
140 domain = "grafana.vidhar.yggdrasil";
141 security.adminPasswordFile = config.sops.secrets."grafana-admin-password".path;
142 security.secretKeyFile = config.sops.secrets."grafana-secret-key".path;
143 protocol = "socket";
144 };
145 sops.secrets."grafana-admin-password" = {
146 format = "binary";
147 sopsFile = ./grafana-admin-password;
148 };
149 sops.secrets."grafana-secret-key" = {
150 format = "binary";
151 sopsFile = ./grafana-secret-key;
152 };
122 }; 153 };
123} 154}