box: add emailer config to grafana
This commit is contained in:
parent
793604b9de
commit
cf2f8b40eb
|
@ -1,11 +1,23 @@
|
||||||
{ self, config, pkgs, ... }: {
|
{ self, config, pkgs, ... }: {
|
||||||
|
age.secrets.smtp_password.file = "${self}/secrets/nullhex-smtp.age";
|
||||||
|
age.secrets.smtp_password.owner = "nobody";
|
||||||
|
|
||||||
# grafana configuration
|
# grafana configuration
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.server = {
|
settings = {
|
||||||
domain = "stats.mossnet.lan";
|
smtp = {
|
||||||
http_port = 2342;
|
enabled = false;
|
||||||
http_addr = "127.0.0.1";
|
password = "$__file{/run/secrets/smtp_password}";
|
||||||
|
host = "smtp.nullhex.com";
|
||||||
|
user = "ops@sealight.xyz";
|
||||||
|
from_address = "ops@sealight.xyz";
|
||||||
|
};
|
||||||
|
server = {
|
||||||
|
domain = "stats.mossnet.lan";
|
||||||
|
http_port = 2342;
|
||||||
|
http_addr = "127.0.0.1";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
# TODO enable
|
# TODO enable
|
||||||
# provision.alerting.rules.path = "${self}/hosts/profiles/monitoring/alert-rules.yaml";
|
# provision.alerting.rules.path = "${self}/hosts/profiles/monitoring/alert-rules.yaml";
|
||||||
|
@ -13,9 +25,9 @@
|
||||||
|
|
||||||
# nginx reverse proxy
|
# nginx reverse proxy
|
||||||
services.nginx.recommendedProxySettings = true; # Needed for new grafana versions
|
services.nginx.recommendedProxySettings = true; # Needed for new grafana versions
|
||||||
services.nginx.virtualHosts.${config.services.grafana.domain} = {
|
services.nginx.virtualHosts.${config.services.grafana.settings.server.domain} = {
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:${toString config.services.grafana.port}";
|
proxyPass = "http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue