Add grafana
This commit is contained in:
parent
20b3f1ef42
commit
a69ff29470
2 changed files with 29 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
./dnsmasq.nix
|
./dnsmasq.nix
|
||||||
./dyndns.nix
|
./dyndns.nix
|
||||||
./freeradius.nix
|
./freeradius.nix
|
||||||
|
./grafana.nix
|
||||||
./labsync
|
./labsync
|
||||||
./unifi-controller.nix
|
./unifi-controller.nix
|
||||||
./wekan.nix
|
./wekan.nix
|
||||||
|
|
|
||||||
28
machines/raven/services/grafana.nix
Normal file
28
machines/raven/services/grafana.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
domain = "grafana.fablab-nea.de";
|
||||||
|
srv = config.services.grafana.settings.server;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.grafana = {
|
||||||
|
enable = true;
|
||||||
|
settings.server.domain = domain;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${domain}" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${srv.http_addr}:${toString srv.http_port}";
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
||||||
|
add_header X-Frame-Options "SAMEORIGIN";
|
||||||
|
add_header X-XSS-Protection "1; mode=block";
|
||||||
|
add_header X-Content-Type-Options "nosniff";
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue