- Install Nix
- If you already have Nix installed, you must enable Flakes manually.
- Then, run the following to check that everything is green ✅.
nix run github:srid/nix-health
- [Optional] Setup the Nix binary cache:
nix run nixpkgs#cachix use nammayatri
- For this command to succeed, you must have added yourself to the
trusted-users
list ofnix.conf
- For this command to succeed, you must have added yourself to the
- Install home-manager1 and setup nix-direnv and starship by following the instructions in this home-manager template.2 You want this to facilitate a nice Nix develoment environment.
cargo
is available in the Nix develop shell. You can also use one of the just
commands (shown in Nix shell banner) to invoke cargo indirectly.
The necessary extensions are configured in .vscode/
. See nammayatri README for complete instructions.
Run just fmt
(or treefmt
) to auto-format the project tree. The CI checks for it.
pre-commit hooks will be installed in the Nix devshell. Run the pre-commit
command to manually run them. You can also run pre-commit run -a
to run pre-commit hooks on all files (modified or not).
Run just services
to run the service dependencies (example: redis-server) using services-flake.
Run nix build
in the project which produces a ./result
symlink. You can also run nix run
to run the program immediately after build.
Clone and Run dynamic-driver-offer-app as it will be used for Internal Authentication and Testing postman flow.
Import the Postman Collection in postman to test the API flow or Run newman run LocationTrackingService.postman_collection.json --delay-request 2000
.
Run nix run nixpkgs#nixci
locally to make sure that the project builds. The CI runs the same.
In cargo.toml add :
debug = true
debug-assertions = false
[profile.release]
debug = true
debug-assertions = false```