NixOS-like services for Nix flakes
Go to file
Abhishek Singh dafaeb048d
explicitly define project root in treefmt (#103)
* explicitly define project root in treefmt

* define `projectRootFile` in `treefmt`

* make `treefmt.projectRoot` as `inputs.services-flake`

* use github flake url

* flake.nix as projectRootFile

* add comment

* force override-input in test flake

---------

Co-authored-by: shivaraj-bh <sbh69840@gmail.com>
2024-02-20 11:06:02 +05:30
.github/workflows Revert "ci: Don't upgrade Nix behind the scenes" (#94) 2024-02-11 04:52:32 -05:00
dev explicitly define project root in treefmt (#103) 2024-02-20 11:06:02 +05:30
doc change clickhouse extraConfig type to yaml (#99) 2024-02-19 11:08:14 +05:30
example example: update services-flake 2024-02-12 04:47:51 -05:00
nix change clickhouse extraConfig type to yaml (#99) 2024-02-19 11:08:14 +05:30
test explicitly define project root in treefmt (#103) 2024-02-20 11:06:02 +05:30
.envrc Revert "dev flake: check example and tests" 2023-07-10 19:36:14 -04:00
.gitignore just: test specific service (#101) 2024-02-19 11:12:43 +05:30
flake.nix explicitly define project root in treefmt (#103) 2024-02-20 11:06:02 +05:30
justfile just: test specific service (#101) 2024-02-19 11:12:43 +05:30
LICENSE Initial commit 2023-06-19 17:44:27 -04:00
README.md [Docs] Home page and getting started (#83) 2024-01-21 17:59:30 +05:30

services-flake

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

See the list here.

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.

Discussions

To discuss the project, please join our Zulip.

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