You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Set up a development environment using Docker Compose](#set-up-a-development-environment-using-docker-compose)
18
+
-[Set up a Nix development environment](#set-up-a-nix-development-environment)
19
+
-[Install Nix](#install-nix)
20
+
-[Using external services through Nix](#using-external-services-through-nix)
21
+
-[Develop in a Nix environment (coming soon)](#develop-in-a-nix-environment-coming-soon)
18
22
-[Set up a Rust environment and other dependencies](#set-up-a-rust-environment-and-other-dependencies)
19
23
-[Set up dependencies on Ubuntu-based systems](#set-up-dependencies-on-ubuntu-based-systems)
20
24
-[Set up dependencies on Windows (Ubuntu on WSL2)](#set-up-dependencies-on-windows-ubuntu-on-wsl2)
@@ -166,6 +170,43 @@ Once the services have been confirmed to be up and running, you can proceed with
166
170
If the command returned a `200 OK` status code, proceed with
167
171
[trying out our APIs](#try-out-our-apis).
168
172
173
+
## Set up a Nix development environment
174
+
175
+
A Nix development environment simplifies the setup of required project dependencies. This is available for MacOS, Linux and WSL2 users.
176
+
177
+
### Install nix
178
+
179
+
We recommend that you install Nix using [the DetSys nix-installer][detsys-nixos-installer], which automatically enables flakes.
180
+
181
+
As an **optional** next step, if you are interested in using Nix to manage your dotfiles and local packages, you can setup [nixos-unified-template][nixos-unified-template-repo].
182
+
183
+
### Using external services through Nix
184
+
185
+
Once Nix is installed, you can use it to manage external services via `flakes`. More services will be added soon.
186
+
187
+
- Run below command in hyperswitch directory
188
+
189
+
```shell
190
+
nix run .#ext-services
191
+
```
192
+
193
+
This will start the following services using `process-compose`
194
+
- PostgreSQL
195
+
- Creates database and an user to be used by the application
196
+
- Redis
197
+
198
+
### Develop in a Nix environment (coming soon)
199
+
200
+
Nix development environment ensures all the required project dependencies, including both the tools and services are readily available, eliminating the need for manual setup.
201
+
202
+
Run below command in hyperswitch directory
203
+
204
+
```shell
205
+
nix develop
206
+
```
207
+
208
+
**NOTE:** This is a work in progress, and only a selected commands are available at the moment. Look in `flake.nix` (hyperswitch-shell) for a full list of packages.
209
+
169
210
## Set up a Rust environment and other dependencies
170
211
171
212
If you are using `nix`, please skip the setup dependencies step and jump to
@@ -681,3 +722,5 @@ To explore more of our APIs, please check the remaining folders in the
0 commit comments