NixOS-like services for Nix flakes, as a process-compose-flake module (based on flake-parts).
$ nix flake new --template github:juspay/services-flake ./my-project
$ cd my-project
$ nix run
Or see ./test/flake.nix
See the list here.
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.
To discuss the project, please join our Zulip.
- 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://github.com/flake-parts/community.flake.parts#guidelines-for-writing-docs
Thanks to the devenv project on which much of our services implementation is based on.
This is currently not possible (nor prioritized by the devenv project), which is why we must create our own services. See cachix/devenv#75