host/tatos: add grafana
This commit is contained in:
parent
d0b2785350
commit
3025145ec6
2 changed files with 31 additions and 0 deletions
hosts/tatos/services
|
@ -2,6 +2,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./grafana
|
||||
./miniflux
|
||||
./wireguard
|
||||
./nginx.nix
|
||||
|
|
30
hosts/tatos/services/grafana/default.nix
Normal file
30
hosts/tatos/services/grafana/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
addr = "127.0.0.1";
|
||||
port = 33002;
|
||||
domain = "grafana.pleshevski.ru";
|
||||
|
||||
in
|
||||
{
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.grafana;
|
||||
settings = {
|
||||
server = {
|
||||
http_addr = addr;
|
||||
http_port = port;
|
||||
inherit domain;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${addr}:${toString port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue