Add the initial devenv
This adds a basic nix-themed dev shell for lemmy development flow (and is otherwise a noop if you don't have nix in your OS).
It can build the package, however the nix build itself is broken (due to submodules). It's not a critical feature, though.
Also adds the postgres into the shell, to support straight-on lemmy development.
The rust toolchain is frozen at stable, which is enough to build lemmy at the time of writing.
Not sure about the CI failure as it's in the file I didn't touch.
Would be good if someone who is familiar with nix could review this.
This adds a ton of nixOS specific stuff into the code base, and none of the main developers use it. Wouldn't these additions be better suited to a fork, or a new project that handles nixOS specifically?
We already have Lemmy packaged in NixOS and Nixpkgs, this is a development environment, while a development environment can live outside of the repo, it may defeat the purpose of this PR to do so, I imagine.
I personally don't commit my Nix development environments to the upstreams whom I work with except they are already using Nix mostly.
That's fair. My reasoning was that it was easier to have specific rust dependencies and to have a sidecar postgres in the shell (given lemmy doesn't work without postgres at all), but it's fair that you can just use docker compose for it all.