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
Copy file name to clipboardExpand all lines: README.md
+67-26Lines changed: 67 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -3,90 +3,131 @@ Mirra Backend is an umbrella project that contains several apps within it.
3
3
4
4
The objective is to split the project into multiple applications (modules) based on their responsibilities. This will allow us to add decoupled modules that can be used together without having a dependency between them.
5
5
6
-
## Requirements
6
+
## Setup Guide
7
+
8
+
This guide will help you install the necessary tools and run the backend services for the Mirra project.
9
+
10
+
## 1. Install Nix
11
+
12
+
Run the following command in the terminal:
7
13
8
-
-**Nix:**
9
-
You can install the Nix package manager by running the following command in your terminal:
The installer will ask you for the sudo password, and then print the details about what steps it will perform to install Nix. You have to accept this to proceed with the installation.
18
+
The installer will ask you for the sudo password, and then print the details about what steps it will perform to install Nix. You have to accept this to proceed with the installation
15
19
16
20
Make sure there weren't any errors during the installation and, if there are none, close the shell and start a new one.
17
21
18
22
To test if Nix generally works, just run GNU hello or any other package:
23
+
19
24
```bash
20
25
nix run nixpkgs#hello
26
+
```
27
+
28
+
If you see:
29
+
30
+
```bash
21
31
> Hello, world!
22
32
```
23
33
24
-
For a more detailed explanation, visit the [Nixcademy installation guide](https://nixcademy.com/2024/01/15/nix-on-macos/).
34
+
Then Nix has been installed correctly. For more details, check the [Nixcademy installation guide](https://nixcademy.com).
35
+
36
+
## 2. Install Devenv
25
37
26
-
-**Devenv:**
38
+
Nix MUST be installed before devenv (devenv depends on nix).
39
+
The following command installs devenv:
27
40
28
-
After installing Nix, run the following command to install devenv:
29
41
```bash
30
42
nix-env -if https://install.devenv.sh/latest
31
43
```
32
44
33
45
For devenv to manage caches for you, add yourself to trusted-users in nix conf:
46
+
34
47
```bash
35
-
# Log in as super user first
36
48
sudo su -
37
-
# Open config file using Vim
38
49
vim /etc/nix/nix.custom.conf
39
-
# Add the users you want to use nix store to nix.custom.conf file
40
-
# Press 'i' to write stuff in file using vim (insert mode).
41
-
# Press 'esc' (exit insert mode) then type ':wq' to save changes.
50
+
```
51
+
52
+
Inside Vim, press `i` to edit and add the following line, replacing `your-user` with your actual username:
53
+
54
+
```bash
42
55
trusted-users = root your-user
43
-
# If you don't know your user, you can type the following in a terminal:
56
+
```
57
+
58
+
59
+
Save and exit Vim (`Esc`, then `:wq` and Enter).
60
+
61
+
- If you don't know your user, you can type the following in a terminal:
62
+
63
+
```bash
44
64
whoami
45
-
# Restart nix-daemon
65
+
```
66
+
67
+
Then after you're done with Vim, You have to restart the nix-daemon
0 commit comments