With my limited knowledge, I’m trying to figure out how to configure a PostgreSQL database in my dev environment, created via a
shell.nix file. Currently, in
shellHook, I edit
sed right after calling
initdb, but there has to be a better solution, especially if many options need to configured.
Tried passing the configuration options directly to
pg_ctl but they don’t seem to take effect:
pg_ctl \ -D $PGDATA \ -l $PGDATA/postgres.log \ -o "-c log_destination='stderr'" \ -o "-c logging_collector=on" \ -o "-c log_directory=\'log\'" \ -o "-c log_filename=\'postgresql-%Y-%m-%d_%H%M%S.log\'" \ -o "-c log_min_messages=info" \ -o "-c log_min_error_statement=info" \ -o "-c log_connections=on" \ start
- these are global options, so how would one use it with
- these are NixOS-specific options, so what could one do on a non-NixOS system?
I’m trying to make this work on Ubuntu instance in Google Cloud Engine (GCE) but once I figured out NixOps, I hope to move to NixOS entirely.
I’m fairly sure that I also have profound misunderstandings regarding Nix and NixOS, therefore please don’t hesitate to correct me.