improve all the things
This commit is contained in:
parent
7cbd49fe42
commit
0357003655
10 changed files with 171 additions and 41 deletions
29
hosts/monitoring/nginx.nix
Normal file
29
hosts/monitoring/nginx.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.nginx = {
|
||||
upstreams.grafana.servers."localhost:3000" = {};
|
||||
virtualHosts."${config.networking.hostName}.${config.networking.domain}" = {
|
||||
default = true;
|
||||
quic = true;
|
||||
kTLS = true;
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
#auth_basic "Administrator’s Area";
|
||||
#auth_basic_user_file ${config.age.secrets.grafana-basic-auth.path};
|
||||
locations = {
|
||||
#"/.well-known/acme-challenge".root = config.security.acme.defaults.webroot;
|
||||
"/" = {
|
||||
recommendedProxySettings = true;
|
||||
proxyPass = "http://grafana";
|
||||
};
|
||||
"/api/live/" = {
|
||||
recommendedProxySettings = true;
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://grafana";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue