Skip to content

refactor(nix,postgres): update initial database setup to use structured configuration to improving readability and maintainability#5337

Draft
JakobLichterfeld wants to merge 1 commit into
mainfrom
feat-nix-postgresql-config-refactoring
Draft

refactor(nix,postgres): update initial database setup to use structured configuration to improving readability and maintainability#5337
JakobLichterfeld wants to merge 1 commit into
mainfrom
feat-nix-postgresql-config-refactoring

Conversation

@JakobLichterfeld

Copy link
Copy Markdown
Member

Refactor the initial database setup to utilize a more structured approach with an array of initialDatabases, improving readability and maintainability.

@JakobLichterfeld JakobLichterfeld added the enhancement New feature or request label May 15, 2026
@netlify

netlify Bot commented May 15, 2026

Copy link
Copy Markdown

Deploy Preview for teslamate ready!

Name Link
🔨 Latest commit 9d9df9f
🔍 Latest deploy log https://app.netlify.com/projects/teslamate/deploys/6a0b0cc29a25220008ea55f9
😎 Deploy Preview https://deploy-preview-5337--teslamate.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@JakobLichterfeld JakobLichterfeld modified the milestone: v3.1.0 May 15, 2026
@JakobLichterfeld JakobLichterfeld marked this pull request as draft May 15, 2026 17:09
@JakobLichterfeld

Copy link
Copy Markdown
Member Author

initialDatabases is not in NixOS 25.11, therefore we need to wait with this till it is releases

@brianmay

Copy link
Copy Markdown
Collaborator

I would really like to update this sometime to use the socket connection to the database by default rather then the TCP connection. Not only is there likely to be a tiny performance gain, but means there is one less password to worry about.

Not sure about grafana though, is that supports socket connections or not. And it probably should have a dedicated postgresql user too.

Don't know if any of this is in scope for this change or not. But maybe something to think about.

@JakobLichterfeld

JakobLichterfeld commented May 17, 2026

Copy link
Copy Markdown
Member Author

Exactly. I wonder the same, would it be possible to use socket connection and grafana (yes I do it similar with Prometheus in my homelab) and TeslaMate as well to connect to the DB at the same time? Why not.

As it seems like the options I tried to use won't be available (old links in mynixos.com) I will look more into it.

@JakobLichterfeld JakobLichterfeld force-pushed the feat-nix-postgresql-config-refactoring branch from 4a82f1e to e712294 Compare May 18, 2026 12:39
@JakobLichterfeld

Copy link
Copy Markdown
Member Author

As it seems like the options I tried to use won't be available (old links in mynixos.com) I will look more into it.

Replaced with the familiar once and use ensureClauses for superuser and password set. The latter needs testing.

…ed configuration to improving readability and maintainability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants