Skip to content

Commit c4ea44b

Browse files
stackptrclaude
andauthored
feat: migrate Grafana to PostgreSQL on glyph (#364)
Configure Grafana on spore to use centralized PostgreSQL on glyph via Tailscale instead of local SQLite. Add grafana database, user, and backup to glyph's PostgreSQL configuration. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 237a8de commit c4ea44b

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

hosts/glyph/services/db.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@
1212
port = 5432;
1313
max_connections = 150;
1414
};
15-
ensureDatabases = ["atticd" "open-webui" "pocketid"];
15+
ensureDatabases = ["atticd" "grafana" "open-webui" "pocketid"];
1616
ensureUsers = [
1717
{
1818
name = "atticd";
1919
ensureDBOwnership = true;
2020
}
21+
{
22+
name = "grafana";
23+
ensureDBOwnership = true;
24+
}
2125
{
2226
name = "open-webui";
2327
ensureDBOwnership = true;
@@ -31,6 +35,6 @@
3135

3236
services.postgresqlBackup = {
3337
enable = true;
34-
databases = ["atticd" "open-webui" "pocketid"];
38+
databases = ["atticd" "grafana" "open-webui" "pocketid"];
3539
};
3640
}

hosts/spore/services/grafana.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@
4343
auto_login = false;
4444
skip_org_role_sync = true;
4545
};
46+
database = {
47+
type = "postgres";
48+
host = "glyph.rove-duck.ts.net:5432";
49+
name = "grafana";
50+
user = "grafana";
51+
ssl_mode = "disable";
52+
};
4653
security = {
4754
admin_user = "corey@zx.dev";
4855
admin_email = "corey@zx.dev";

0 commit comments

Comments
 (0)