added grafana to queen
This commit is contained in:
parent
45fc46cb9f
commit
b5be1009cf
14
nixos/server/package-configs/dashboard/default.nix
Normal file
14
nixos/server/package-configs/dashboard/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./grafana
|
||||
#./loki
|
||||
#./prometheus
|
||||
];
|
||||
}
|
25
nixos/server/package-configs/dashboard/grafana/default.nix
Normal file
25
nixos/server/package-configs/dashboard/grafana/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# grafana configuration
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
domain = "grafana.lillianviolet.dev";
|
||||
http_port = 2342;
|
||||
http_addr = "127.0.0.1";
|
||||
};
|
||||
|
||||
# nginx reverse proxy
|
||||
services.nginx.virtualHosts.${config.services.grafana.domain} = {
|
||||
## Force HTTP redirect to HTTPS
|
||||
forceSSL = true;
|
||||
## LetsEncrypt
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.grafana.port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -15,5 +15,6 @@
|
|||
./postgres
|
||||
./roundcube
|
||||
./coturn
|
||||
./dashboard
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue