Add external database for grafana

This commit is contained in:
Théo Barnouin 2024-09-25 13:36:18 +02:00
parent fefb6ce762
commit 74e0b67828
2 changed files with 8 additions and 0 deletions

View file

@ -27,6 +27,7 @@
system = "x86_64-linux"; system = "x86_64-linux";
username = "tbarnouin"; username = "tbarnouin";
proxy_host = "192.168.1.40"; proxy_host = "192.168.1.40";
pgsql_host = "192.168.1.13";
in in
{ {
nixosConfigurations = { nixosConfigurations = {

View file

@ -23,6 +23,13 @@ in
root_url = "https://logs.le43.eu"; root_url = "https://logs.le43.eu";
serve_from_sub_path = false; serve_from_sub_path = false;
}; };
database = {
type = "postgres";
host = "${cfg.pgsql_host}:5432";
name = "grafana";
user = "grafana";
password = "\$__file{/run/secrets/grafana/database_secret}";
};
auth = { auth = {
signout_redirect_url = https://authentik.le43.eu/application/o/grafana/end-session/; signout_redirect_url = https://authentik.le43.eu/application/o/grafana/end-session/;
oauth_auto_login = true; oauth_auto_login = true;