add default database to grafana

This commit is contained in:
2023-08-19 01:27:34 +02:00
parent 6dc3798dc7
commit 228d0d334b
2 changed files with 10 additions and 3 deletions

View File

@@ -69,6 +69,16 @@ in
locations."/".extraConfig = "proxy_pass http://localhost:3001;";
};
services.postgresql.ensureUsers = [
{
name = "grafana";
ensurePermissions = {
"DATABASE \"grafana\"" = "ALL PRIVILEGES";
"ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
};
}
];
services.postgresql.ensureDatabases = [ "grafana" ];
services.postgresqlBackup.databases = [ "grafana" ];
sops.secrets = {

View File

@@ -100,7 +100,6 @@ in
sops.secrets.promtail-nginx-password.owner = "nginx";
security.acme.certs."loki.r".server = config.retiolum.ca.acmeURL;
services.nginx.virtualHosts."loki.cloonar.com" = {
forceSSL = true;
enableACME = true;
@@ -128,6 +127,4 @@ in
'';
};
};
networking.firewall.interfaces."tinc.retiolum".allowedTCPPorts = [ 80 ];
}