Setup mail server and restructure some things
This commit is contained in:
parent
4c382e629d
commit
ba93d164cf
90 changed files with 512 additions and 66 deletions
36
config/hosts/metrics/grafana.nix
Normal file
36
config/hosts/metrics/grafana.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ 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;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue