Skip to content

Commit 8b0fc99

Browse files
Merge pull request #158 from go-viper/devenv
chore: switch to devenv
2 parents 99f0842 + 66680cf commit 8b0fc99

File tree

9 files changed

+144
-349
lines changed

9 files changed

+144
-349
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ indent_size = 2
1919

2020
[.golangci.yaml]
2121
indent_size = 2
22+
23+
[devenv.yaml]
24+
indent_size = 2

.envrc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
2-
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
3-
fi
4-
use flake . --impure
1+
#!/usr/bin/env bash
2+
3+
export DIRENV_WARN_TIMEOUT=20s
4+
5+
eval "$(devenv direnvrc)"
6+
7+
use devenv

.github/workflows/ci.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches: [main]
66
pull_request:
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
test:
1013
name: Test
@@ -21,6 +24,7 @@ jobs:
2124
"1.22",
2225
"1.23",
2326
"1.24",
27+
"1.25",
2428
"stable",
2529
"oldstable",
2630
]
@@ -48,9 +52,9 @@ jobs:
4852
- name: Set up Go
4953
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
5054
with:
51-
go-version: "1.24"
55+
go-version: "1.25"
5256

5357
- name: Lint
5458
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
5559
with:
56-
version: v2.1.6
60+
version: v2.6.2

.gitignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
/.devenv/
2-
/.direnv/
3-
/.pre-commit-config.yaml
41
/bin/
52
/build/
63
/var/
4+
5+
# Devenv
6+
.devenv*
7+
devenv.local.nix
8+
devenv.local.yaml
9+
.direnv
10+
.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": 1765288076,
7+
"owner": "cachix",
8+
"repo": "devenv",
9+
"rev": "93c055af1e8fcac49251f1b2e1c57f78620ad351",
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": 1765121682,
23+
"owner": "edolstra",
24+
"repo": "flake-compat",
25+
"rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3",
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": 1765016596,
44+
"owner": "cachix",
45+
"repo": "git-hooks.nix",
46+
"rev": "548fc44fca28a5e81c5d6b846e555e6b9c2a5a3c",
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": 1762808025,
64+
"owner": "hercules-ci",
65+
"repo": "gitignore.nix",
66+
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
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": 1764580874,
78+
"owner": "cachix",
79+
"repo": "devenv-nixpkgs",
80+
"rev": "dcf61356c3ab25f1362b4a4428a6d871e84f1d1d",
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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
pkgs,
3+
...
4+
}:
5+
6+
{
7+
languages = {
8+
go.enable = true;
9+
};
10+
11+
packages = with pkgs; [
12+
golangci-lint
13+
];
14+
}

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)