Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services/postgresql: update to the latest upstream nixos module #468

Merged
merged 1 commit into from
Dec 14, 2022

Conversation

lf-
Copy link
Contributor

@lf- lf- commented Jun 6, 2022

I want a newish postgres config to work on my Mac.

This contains a little hack (putting the check-config derivation into
the start script as a comment) to deal with not having #356. Also,
it does not implement the stuff that requires a postStart script.

It's otherwise identical to the upstream module.

I changed the service to use utf8 always because the charset option got deleted in the upstream module. It seems to work and I can connect to it.

I want a newish postgres config to work on my Mac.

This contains a little hack (putting the check-config derivation into
the start script as a comment) to deal with not having LnL7#356.

It's otherwise identical to the upstream module.
@domenkozar domenkozar merged commit 2795e05 into LnL7:master Dec 14, 2022
@olib963
Copy link

olib963 commented Jan 4, 2023

First of all, thanks for all the great work 😄 it's great to be able to use nix on all my machines. I just wanted to point out that post this PR I am now getting:

  1. initdb: error: no data directory specified as I believe we've removed -D ${cfg.dataDir} from the initdb call, I think this should be a fairly easy fix either explicitly or by adding this into the initdbArgs by default which is my workaround, but wanted to check if there was a reason it was excluded?
  2. Peer authentication failed for user "postgres" I believe this is due to the addition of authentication files, I've added a workaround locally by setting: authentication= ''local all postgres trust''; but I'm not sure the change is documented in any way. Given that we don't yet have the ability to ensureUsers perhaps we should add a documenting comment as I'm struggling to see how to setup a clean database.

Happy to open PRs if we are comfortable proceeding with either of the above.

@lf- did you manage to get a clean database setup using this configuration? Perhaps I did something wrong in my setup.

@lf-
Copy link
Contributor Author

lf- commented Jan 4, 2023

Yes I used it every day with this module so it definitely works. no recollection as to how the auth was set up, it was done 6 months ago, and i don't have the computer anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants