Skip to content

Commit 3928a54

Browse files
committed
migrate to devenv
1 parent d1d6370 commit 3928a54

File tree

7 files changed

+162
-102
lines changed

7 files changed

+162
-102
lines changed

.envrc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
watch_file *.nix
2-
watch_file flake.lock
3-
use flake
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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,13 @@ out/
152152
# Sitemap stuff
153153
public/robots.txt
154154
public/sitemap*.xml
155+
156+
# Devenv
157+
.devenv*
158+
devenv.local.nix
159+
160+
# direnv
161+
.direnv
162+
163+
# pre-commit
164+
.pre-commit-config.yaml

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": 1755355634,
7+
"owner": "cachix",
8+
"repo": "devenv",
9+
"rev": "85e78cbe26467a2c23c9d34869235740132d749f",
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": 1755446520,
44+
"owner": "cachix",
45+
"repo": "git-hooks.nix",
46+
"rev": "4b04db83821b819bbbe32ed0a025b31e7971f22e",
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": 1754299112,
78+
"owner": "cachix",
79+
"repo": "devenv-nixpkgs",
80+
"rev": "16c21c9f5c6fb978466e91182a248dd8ca1112ac",
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: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{ pkgs, ... }:
2+
3+
{
4+
packages = with pkgs; [
5+
nixfmt-rfc-style
6+
git
7+
biome
8+
awscli2
9+
];
10+
11+
dotenv.enable = true;
12+
languages.javascript = {
13+
enable = true;
14+
bun.enable = true;
15+
};
16+
17+
scripts.update-static-assets.exec = ''
18+
set +x
19+
GIT_ROOT=$(git rev-parse --show-toplevel)
20+
if [ ! -e ./static-assets ]; then
21+
echo "Incorrect directory; must have static-assets folder."
22+
exit 1
23+
fi
24+
${pkgs.awscli2}/bin/aws s3 sync --exclude '.*' \
25+
--profile ian --acl public-read \
26+
$GIT_ROOT/static-assets s3://static.ian.pw/images/
27+
'';
28+
}

devenv.yaml

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

flake.lock

Lines changed: 0 additions & 61 deletions
This file was deleted.

flake.nix

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)