.github/workflows | ||
dev | ||
doc | ||
example | ||
nix | ||
test | ||
.envrc | ||
.gitignore | ||
flake.nix | ||
justfile | ||
LICENSE | ||
README.md |
services-flake
Note
🚧 Work in Progress
NixOS-like services for Nix flakes, as a process-compose-flake module (based on flake-parts).
Getting Started
$ nix flake new --template github:juspay/services-flake ./my-project
$ cd my-project
$ nix run
Or see ./test/flake.nix
Services available
- Apache Kafka
- Elasticsearch
- MySQL
- PostgreSQL
- Redis
- Redis Cluster
- Zookeeper
- ...
A note on process working directory
The dataDir
of these services tend to take relative paths, which are usually relative to the project root. As such, when you run these services using nix run
, their data files are created relative to whichever directory you are in. If you want these data files to always reside relative to the project directory, instead of using nix run
consider wrapping the process-compose packages in script, via either mission-control module or a justfile. The example uses the latter.
Contributing
- If you are adding a new service, see https://github.com/cachix/devenv/tree/main/src/modules/services for inspiration.
- For contributing to docs, see https://flakular.in/about#contributing
Credits
Thanks to the devenv project on which much of our services implementation is based on.
FAQ
Why not re-use devenv service modules?
This is currently not possible (nor prioritized by the devenv project), which is why we must create our own services. See https://github.com/cachix/devenv/issues/75