Skip to content

Commit dd52fa5

Browse files
Merge pull request #66 from sagikazarmark/devenv
Use devenv
2 parents a66e1c7 + 2ea32a7 commit dd52fa5

File tree

8 files changed

+142
-317
lines changed

8 files changed

+142
-317
lines changed

.envrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if ! has nix_direnv_version || ! nix_direnv_version 3.1.0; then
2-
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.1.0/direnvrc" "sha256-yMJ2OVMzrFaDPn7q8nCBZFRYpL/f0RcHzhmw/i6btJM="
3-
fi
4-
use flake . --impure
1+
export DIRENV_WARN_TIMEOUT=20s
2+
3+
eval "$(devenv direnvrc)"
4+
use devenv

.github/workflows/ci.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,19 @@ jobs:
6565
- name: Checkout repository
6666
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6767

68-
- name: Set up Go
69-
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
68+
- name: Install Nix
69+
uses: cachix/install-nix-action@7be5dee1421f63d07e71ce6e0a9f8a4b07c2a487 # v31.6.1
70+
71+
- name: Configure cachix
72+
uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
7073
with:
71-
go-version: "1.25"
74+
name: devenv
75+
76+
- name: Install devenv
77+
run: nix profile add nixpkgs#devenv
7278

7379
- name: Lint
74-
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
75-
with:
76-
version: v2.4.0
80+
run: devenv shell -- just lint
7781

7882
dependency-review:
7983
name: Dependency review

.gitignore

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
/.devenv/
1+
# Devenv
2+
/.devenv*
23
/.direnv/
3-
/.task/
4-
/bin/
5-
/build/
6-
/tmp/
7-
/var/
8-
/vendor/
4+
devenv.local.nix
5+
.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": 1758285954,
7+
"owner": "cachix",
8+
"repo": "devenv",
9+
"rev": "0f0e4c6921995ae9334b546eac71a5800621baa8",
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+
"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: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{ pkgs, ... }:
2+
3+
{
4+
cachix.pull = [ "sagikazarmark-dev" ];
5+
6+
languages = {
7+
go = {
8+
enable = true;
9+
package = pkgs.go_1_25;
10+
};
11+
};
12+
13+
packages = with pkgs; [
14+
just
15+
golangci-lint
16+
];
17+
}

devenv.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
2+
inputs:
3+
nixpkgs:
4+
url: github:cachix/devenv-nixpkgs/rolling

0 commit comments

Comments
 (0)