3 ms·
Sure, this is a super abbreviated version of my current setup for developing https://notado.app https://notado.app shell.nix - this brings the packages I need
by bsnnkv 4y ago
Sure, this is a super abbreviated version of my current setup for developing https://notado.app https://notado.app
shell.nix - this brings the packages I need to develop into the $PATH when I run `nix-shell` in the repo
{pkgs ? import <nixpkgs> {}}:
with pkgs;
mkShell {
buildInputs = [
meilisearch
openssl
overmind
pkg-config
postgresql
rustup
tmux
];
shellHook = ''
export OVERMIND_PROCFILE=Procfile.dev
export PGDATA="data.pg"
export MEILI_DB_PATH="data.ms"
'';
}
Procfile.dev - this is used to start the background services I need, the format is "name: command"
postgres: postgres -K /tmp
meilisearch: meilisearch
Then I can run `nix-shell` to load all the dependencies and `overmind start` to bring up Postgres + Meilisearch with ignored data dirs relative to the project folder. If any of these packages need to be pinned to a specific version you can do that with this tool[1].
That's pretty much it - with all the background services running you can load your monolith or microservices with cargo/npm/etc. It's all very nice and clean!
[1]: https://lazamar.co.uk/nix-versions/ https://lazamar.co.uk/nix-versions/ - I actually just used this in a new shell.nix for my personal website to pin a version of Hugo from 2019 (when I last touched it) so that it would build again
- pmarreck 4y agothis is great, and I never heard of Overmind until now (looks cool!) but you could also flake this config out and get a couple more perks, like possibly not having to use the nix-versions thing