Skip to content

Commit aed4751

Browse files
committed
chore: Add development environment configuration files
1 parent 807f480 commit aed4751

File tree

5 files changed

+199
-0
lines changed

5 files changed

+199
-0
lines changed

.envrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export DIRENV_WARN_TIMEOUT=20s
2+
3+
eval "$(devenv direnvrc)"
4+
5+
# The use_devenv function supports passing flags to the devenv command
6+
# For example: use devenv --impure --option services.postgres.enable:bool true
7+
use devenv

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ package-lock.json
1313
/priv/bun
1414
bun.lockb
1515
bun.lock
16+
.devenv/
17+
.devenv.flake.nix

devenv.lock

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
{
2+
"nodes": {
3+
"devenv": {
4+
"locked": {
5+
"dir": "src/modules",
6+
"lastModified": 1758366037,
7+
"owner": "cachix",
8+
"repo": "devenv",
9+
"rev": "ebb56bfe1aa0936de2f8a68c616dabff1285e905",
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": 1747046372,
23+
"owner": "edolstra",
24+
"repo": "flake-compat",
25+
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
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": 1758108966,
44+
"owner": "cachix",
45+
"repo": "git-hooks.nix",
46+
"rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b",
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": 1755783167,
78+
"owner": "cachix",
79+
"repo": "devenv-nixpkgs",
80+
"rev": "4a880fb247d24fbca57269af672e8f78935b0328",
81+
"type": "github"
82+
},
83+
"original": {
84+
"owner": "cachix",
85+
"ref": "rolling",
86+
"repo": "devenv-nixpkgs",
87+
"type": "github"
88+
}
89+
},
90+
"nixpkgs-stable": {
91+
"locked": {
92+
"lastModified": 1758441781,
93+
"owner": "nixos",
94+
"repo": "nixpkgs",
95+
"rev": "4c5924c35ad05baebc59369168b348e6b9bb794d",
96+
"type": "github"
97+
},
98+
"original": {
99+
"owner": "nixos",
100+
"ref": "release-25.05",
101+
"repo": "nixpkgs",
102+
"type": "github"
103+
}
104+
},
105+
"nixpkgs-unstable": {
106+
"locked": {
107+
"lastModified": 1758294315,
108+
"owner": "nixos",
109+
"repo": "nixpkgs",
110+
"rev": "90ade7da38aa49c2e2693a04a44662a0e61530e9",
111+
"type": "github"
112+
},
113+
"original": {
114+
"owner": "nixos",
115+
"ref": "nixpkgs-unstable",
116+
"repo": "nixpkgs",
117+
"type": "github"
118+
}
119+
},
120+
"root": {
121+
"inputs": {
122+
"devenv": "devenv",
123+
"git-hooks": "git-hooks",
124+
"nixpkgs": "nixpkgs",
125+
"nixpkgs-stable": "nixpkgs-stable",
126+
"nixpkgs-unstable": "nixpkgs-unstable",
127+
"pre-commit-hooks": [
128+
"git-hooks"
129+
]
130+
}
131+
}
132+
},
133+
"root": "root",
134+
"version": 7
135+
}

devenv.nix

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{ pkgs, lib, config, inputs, ... }:
2+
3+
let
4+
pkgs-stable = import inputs.nixpkgs-stable { system = pkgs.stdenv.system; };
5+
pkgs-unstable = import inputs.nixpkgs-unstable { system = pkgs.stdenv.system; };
6+
in
7+
{
8+
env.GREET = "Phoenix React";
9+
10+
packages = [
11+
pkgs-stable.git
12+
pkgs-stable.figlet
13+
pkgs-stable.lolcat
14+
pkgs-stable.watchman
15+
pkgs-stable.inotify-tools
16+
pkgs-stable.tailwindcss_4
17+
];
18+
19+
languages.elixir.enable = true;
20+
languages.elixir.package = pkgs-stable.beam27Packages.elixir;
21+
22+
languages.javascript.enable = true;
23+
languages.javascript.pnpm.enable = true;
24+
languages.javascript.bun.enable = true;
25+
languages.javascript.bun.package = pkgs-stable.bun;
26+
27+
scripts.hello.exec = ''
28+
figlet -w 120 $GREET | lolcat
29+
'';
30+
31+
enterShell = ''
32+
hello
33+
'';
34+
35+
}

devenv.yaml

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

0 commit comments

Comments
 (0)