# How to configure PostgreSQL declaratively (NixOS and non-NixOS)?

**URL:** https://discourse.nixos.org/t/how-to-configure-postgresql-declaratively-nixos-and-non-nixos/4063
**Category:** Help
**Created:** [September 16, 2019, 6:45pm UTC](https://discourse.nixos.org/t/how-to-configure-postgresql-declaratively-nixos-and-non-nixos/4063 "2019-09-16T18:45:17Z")
**Posts on this page:** 1
**Showing post:** 15

<div class="post-metadata">

### Author: ![toraritte](https://discourse.nixos.org/user_avatar/discourse.nixos.org/toraritte/32/6777_2.png) [@toraritte](https://discourse.nixos.org/u/toraritte)
#### Post date: [April 4, 2020, 2:04am UTC](https://discourse.nixos.org/t/how-to-configure-postgresql-declaratively-nixos-and-non-nixos/4063/15 "2020-04-04T02:04:42Z")

</div>

The last time I had locale issues, the only thing that worked was a dirty workaround (and, in the end, to switch to another distro from Ubuntu).

This is my question, tried to document everything that I tried, hope it helps:

> <https://stackoverflow.com/questions/50746147/postgresqls-initdb-fails-with-invalid-locale-settings-check-lang-and-lc-e>

---

_[View the full topic](https://discourse.nixos.org/t/how-to-configure-postgresql-declaratively-nixos-and-non-nixos/4063)._
