PostgreSQL: Difference between revisions
Added documentation on how to configure password protected users securely. Made possible by https://github.com/NixOS/nixpkgs/pull/467286 |
→Getting started: Added a note mentioning the pg_config executable |
||
| Line 25: | Line 25: | ||
* [https://search.nixos.org/options?query=services.postgresql Available NixOS Postgresql service options] | * [https://search.nixos.org/options?query=services.postgresql Available NixOS Postgresql service options] | ||
It's also possible to setup PostgreSQL with [[Nix Darwin]] similar to how you would on NixOS, see the [https://daiderd.com/nix-darwin/manual/index.html#opt-services.postgresql.enable options]. | It's also possible to setup PostgreSQL with [[Nix Darwin]] similar to how you would on NixOS, see the [https://daiderd.com/nix-darwin/manual/index.html#opt-services.postgresql.enable options]. | ||
====== Beginner's Note: ====== | |||
If you are studying Postgres by following its [https://www.postgresql.org/docs/current/tutorial.html official tutorial], you would find that the <code>pg_config</code> executable is missing [https://github.com/NixOS/nixpkgs/issues/408785]. To obtain <code>pg_config</code>, use the <code>pg_config</code> attribute of the <code>postgresql</code> package as in: | |||
<syntaxhighlight lang="nix"> | |||
{ | |||
# ... | |||
config.services.postgresql.package = pkgs.postgresql.pg_config; | |||
} | |||
</syntaxhighlight> | |||
=== Verify setup === | === Verify setup === | ||