2024-05-08 21:49:37 +02:00
|
|
|
{ config, ... }:
|
|
|
|
let
|
2024-05-09 14:55:02 +02:00
|
|
|
inherit (config.serverConfig) ports vhosts;
|
2024-05-08 21:49:37 +02:00
|
|
|
inherit (config.networking) domain;
|
2024-05-08 21:50:08 +02:00
|
|
|
in
|
|
|
|
{
|
2024-05-08 21:49:37 +02:00
|
|
|
age.secrets.grafana_admin_pass = {
|
|
|
|
file = ../secrets/grafana_admin_pass.age;
|
|
|
|
owner = "grafana";
|
|
|
|
group = "grafana";
|
|
|
|
mode = "0600";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.grafana = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
security = {
|
|
|
|
admin_user = "admin";
|
|
|
|
admin_email = "admin@${domain}";
|
|
|
|
admin_password = "$__file{${config.age.secrets.grafana_admin_pass.path}}";
|
|
|
|
};
|
|
|
|
server = {
|
2024-05-09 14:55:02 +02:00
|
|
|
domain = vhosts.grafana_host.host;
|
|
|
|
root_url = "https://${vhosts.grafana_host.host}";
|
|
|
|
http_port = vhosts.grafana_host.port;
|
2024-05-08 21:49:37 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|