37 lines
1 KiB
Nix
37 lines
1 KiB
Nix
{ config, ... }:
|
|
{
|
|
services.grafana = {
|
|
enable = true;
|
|
settings = {
|
|
server = {
|
|
domain = "grafana.grzb.de";
|
|
root_url = "https://${config.services.grafana.settings.server.domain}";
|
|
};
|
|
security = {
|
|
cookie_secure = true;
|
|
cookie_samesite = "strict";
|
|
admin_user = "yuri";
|
|
admin_password = "$__file{/secrets/metrics-grafana-admin-password.secret}";
|
|
admin_email = "yuri@nekover.se";
|
|
};
|
|
smtp = {
|
|
enabled = true;
|
|
host = "mail.grzb.de:465";
|
|
user = "grafana";
|
|
password = "$__file{/secrets/metrics-grafana-smtp-password.secret}";
|
|
from_address = "grafana@robot.grzb.de";
|
|
from_name = "Grafana";
|
|
startTLS_policy = "NoStartTLS";
|
|
};
|
|
};
|
|
provision.datasources.settings.datasources = [
|
|
{
|
|
name = "Prometheus";
|
|
type = "prometheus";
|
|
url = "http://localhost:${builtins.toString config.services.prometheus.port}";
|
|
isDefault = true;
|
|
}
|
|
];
|
|
};
|
|
}
|