Skip to content

Commit 38206a9

Browse files
committed
devenv
1 parent c399844 commit 38206a9

File tree

3 files changed

+33
-24
lines changed

3 files changed

+33
-24
lines changed

devenv.lock

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,27 @@
9494
"nixpkgs": "nixpkgs",
9595
"pre-commit-hooks": [
9696
"git-hooks"
97+
],
98+
"rust-overlay": "rust-overlay"
99+
}
100+
},
101+
"rust-overlay": {
102+
"inputs": {
103+
"nixpkgs": [
104+
"nixpkgs"
97105
]
106+
},
107+
"locked": {
108+
"lastModified": 1754362243,
109+
"owner": "oxalica",
110+
"repo": "rust-overlay",
111+
"rev": "3ec3244ffb877f1b7f5d2dbff19241982ab25ff2",
112+
"type": "github"
113+
},
114+
"original": {
115+
"owner": "oxalica",
116+
"repo": "rust-overlay",
117+
"type": "github"
98118
}
99119
}
100120
},

devenv.nix

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,20 @@
1212
cachix.pull = ["m00nwtchr"];
1313

1414
# https://devenv.sh/packages/
15-
packages = [pkgs.git pkgs.cargo-nextest];
15+
packages = with pkgs; [git cargo-nextest cargo-audit];
1616

1717
# https://devenv.sh/languages/
18-
languages.rust.enable = true;
19-
20-
# https://devenv.sh/processes/
21-
# processes.cargo-watch.exec = "cargo-watch";
18+
languages.rust = {
19+
enable = true;
20+
channel = "stable";
21+
version = "latest";
22+
mold.enable = true;
23+
};
2224

2325
# https://devenv.sh/services/
2426
# services.postgres.enable = true;
2527

26-
# https://devenv.sh/scripts/
27-
scripts.hello.exec = ''
28-
echo hello from $GREET
29-
'';
30-
3128
enterShell = ''
32-
hello
3329
git --version
3430
'';
3531

@@ -42,12 +38,12 @@
4238
# https://devenv.sh/tests/
4339
enterTest = ''
4440
echo "Running tests"
45-
git --version | grep --color=auto "${pkgs.git.version}"
4641
cargo nextest run --verbose --workspace --all-features
4742
'';
4843

4944
# https://devenv.sh/git-hooks/
5045
git-hooks.hooks = {
46+
rustfmt.enable = true;
5147
clippy.enable = true;
5248
};
5349

devenv.yaml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
21
inputs:
32
nixpkgs:
43
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
4+
rust-overlay:
5+
url: github:oxalica/rust-overlay
6+
inputs:
7+
nixpkgs:
8+
follows: nixpkgs

0 commit comments

Comments
 (0)