Skip to content

Commit 0c4714a

Browse files
committed
chore(devenv): add devenv to be able to develop the app with nix
1 parent ba9098c commit 0c4714a

File tree

6 files changed

+187
-0
lines changed

6 files changed

+187
-0
lines changed

.envrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export DIRENV_WARN_TIMEOUT=20s
2+
3+
eval "$(devenv direnvrc)"
4+
5+
# `use devenv` supports the same options as the `devenv shell` command.
6+
#
7+
# To silence the output, use `--quiet`.
8+
#
9+
# Example usage: use devenv --quiet --impure --option services.postgres.enable:bool true
10+
use devenv

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,13 @@ src-tauri/gen/*
109109
!README
110110
!**/README.md
111111
!**/README
112+
113+
# Devenv
114+
.devenv*
115+
devenv.local.nix
116+
117+
# direnv
118+
.direnv
119+
120+
# pre-commit
121+
.pre-commit-config.yaml

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,16 @@ If you want to contribute or run the app from source:
137137

138138
This will start the app with hot reload enabled for both frontend and backend changes.
139139

140+
### Pre-requirements for NixOS
141+
142+
1. **Install [devenv](https://devenv.sh/getting-started/)**
143+
144+
2. **Run**:
145+
```bash
146+
devenv shell
147+
```
148+
149+
Then proceed with the instructions above.
140150

141151

142152
## Architecture

devenv.lock

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
{
2+
"nodes": {
3+
"devenv": {
4+
"locked": {
5+
"dir": "src/modules",
6+
"lastModified": 1761922975,
7+
"owner": "cachix",
8+
"repo": "devenv",
9+
"rev": "c9f0b47815a4895fadac87812de8a4de27e0ace1",
10+
"type": "github"
11+
},
12+
"original": {
13+
"dir": "src/modules",
14+
"owner": "cachix",
15+
"repo": "devenv",
16+
"type": "github"
17+
}
18+
},
19+
"flake-compat": {
20+
"flake": false,
21+
"locked": {
22+
"lastModified": 1761588595,
23+
"owner": "edolstra",
24+
"repo": "flake-compat",
25+
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
26+
"type": "github"
27+
},
28+
"original": {
29+
"owner": "edolstra",
30+
"repo": "flake-compat",
31+
"type": "github"
32+
}
33+
},
34+
"git-hooks": {
35+
"inputs": {
36+
"flake-compat": "flake-compat",
37+
"gitignore": "gitignore",
38+
"nixpkgs": [
39+
"nixpkgs"
40+
]
41+
},
42+
"locked": {
43+
"lastModified": 1760663237,
44+
"owner": "cachix",
45+
"repo": "git-hooks.nix",
46+
"rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37",
47+
"type": "github"
48+
},
49+
"original": {
50+
"owner": "cachix",
51+
"repo": "git-hooks.nix",
52+
"type": "github"
53+
}
54+
},
55+
"gitignore": {
56+
"inputs": {
57+
"nixpkgs": [
58+
"git-hooks",
59+
"nixpkgs"
60+
]
61+
},
62+
"locked": {
63+
"lastModified": 1709087332,
64+
"owner": "hercules-ci",
65+
"repo": "gitignore.nix",
66+
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
67+
"type": "github"
68+
},
69+
"original": {
70+
"owner": "hercules-ci",
71+
"repo": "gitignore.nix",
72+
"type": "github"
73+
}
74+
},
75+
"nixpkgs": {
76+
"locked": {
77+
"lastModified": 1761313199,
78+
"owner": "cachix",
79+
"repo": "devenv-nixpkgs",
80+
"rev": "d1c30452ebecfc55185ae6d1c983c09da0c274ff",
81+
"type": "github"
82+
},
83+
"original": {
84+
"owner": "cachix",
85+
"ref": "rolling",
86+
"repo": "devenv-nixpkgs",
87+
"type": "github"
88+
}
89+
},
90+
"root": {
91+
"inputs": {
92+
"devenv": "devenv",
93+
"git-hooks": "git-hooks",
94+
"nixpkgs": "nixpkgs",
95+
"pre-commit-hooks": [
96+
"git-hooks"
97+
]
98+
}
99+
}
100+
},
101+
"root": "root",
102+
"version": 7
103+
}

devenv.nix

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
pkgs,
3+
lib,
4+
config,
5+
inputs,
6+
...
7+
}:
8+
9+
{
10+
packages = with pkgs; [
11+
nodejs_22
12+
13+
at-spi2-atk
14+
atkmm
15+
cairo
16+
gdk-pixbuf
17+
glib
18+
gtk3
19+
harfbuzz
20+
librsvg
21+
libsoup_3
22+
pango
23+
webkitgtk_4_1
24+
openssl
25+
pkg-config
26+
gobject-introspection
27+
cargo
28+
cargo-tauri
29+
];
30+
31+
languages = {
32+
rust.enable = true;
33+
typescript.enable = true;
34+
};
35+
36+
env = {
37+
GSETTINGS_SCHEMA_DIR = "${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}/glib-2.0/schemas";
38+
};
39+
}

devenv.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
2+
inputs:
3+
nixpkgs:
4+
url: github:cachix/devenv-nixpkgs/rolling
5+
6+
# If you're using non-OSS software, you can set allowUnfree to true.
7+
# allowUnfree: true
8+
9+
# If you're willing to use a package that's vulnerable
10+
# permittedInsecurePackages:
11+
# - "openssl-1.1.1w"
12+
13+
# If you have more than one devenv you can merge them
14+
#imports:
15+
# - ./backend

0 commit comments

Comments
 (0)