I’d like to announce a new open-source project from Juspay called services-flake. It allows defining and running services in your project flakes, and works on both Linux and macOS . We internally use it in various projects at Juspay.
Features
-
services-flakes is based on flake-parts, which brings the NixOS module system to flakes and that heavily simplifies the DX while editing Nix.
- Thus, you can share your services across projects (see the Nammayatri blog post below for an example)
-
It works on both Linux and macOS and runs services natively (configured in Nix) without using emulation
- This is made possible by running the services via process-compose.
-
You can define multiple services of the same type
-
We have a native testing infrastructure that you can use to test your services both locally and in CI (pure Nix builds)
We are pretty happy at how it has shaped up so far. There’s room for improvement, and we’re open to any feedback you’ve got.
See Also
-
How we replaced docker-compose with Nix for development in Nammayatri: Replacing docker-compose with Nix for development
-
We are also writing tutorials that lead up to talking about flake-parts: https://nixos.asia/en/nix-tutorial
-
community.flake.parts is an initiative to unify the docs for various flake-modules created using flake-parts. The projects and their docs exists in the repo of their own, keeping it decentralised.