mirror of
https://github.com/tuxdotrs/tnvim.git
synced 2025-07-06 21:36:34 +05:30
refactor: categorised apps
This commit is contained in:
45
modules/nixos/selfhosted/monitoring/grafana.nix
Normal file
45
modules/nixos/selfhosted/monitoring/grafana.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
lib,
|
||||
username,
|
||||
email,
|
||||
...
|
||||
}: {
|
||||
services = {
|
||||
grafana = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server.http_port = 8888;
|
||||
security = {
|
||||
admin_user = "${username}";
|
||||
admin_email = "${email}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nginx = {
|
||||
enable = lib.mkForce true;
|
||||
virtualHosts = {
|
||||
"grafana.tux.rs" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "tux.rs";
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://localhost:8888";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
|
||||
"/api/live/" = {
|
||||
proxyPass = "http://localhost:8888";
|
||||
extraConfig = ''
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user