Fix variable

This commit is contained in:
Théo Barnouin 2024-09-25 13:44:15 +02:00
parent 74e0b67828
commit 87aff6707b
2 changed files with 10 additions and 3 deletions

View file

@ -9,6 +9,10 @@ in
type = lib.types.str;
description = "The Nginx proxy IP address";
};
pgsql_ip = lib.mkOption {
type = lib.types.str;
description = "The PostgreSQL host IP address";
};
};
config = lib.mkIf cfg.enable {
services.rsyslogd.enable = true;
@ -25,7 +29,7 @@ in
};
database = {
type = "postgres";
host = "${cfg.pgsql_host}:5432";
host = "${cfg.pgsql_ip}:5432";
name = "grafana";
user = "grafana";
password = "\$__file{/run/secrets/grafana/database_secret}";