Skip to content

Commit 859de28

Browse files
committed
chore: use devenv instead of nix flake
1 parent e6b15d2 commit 859de28

File tree

6 files changed

+213
-12
lines changed

6 files changed

+213
-12
lines changed

.envrc

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
#!/usr/bin/env sh
1+
#!/usr/bin/env bash
22

3-
use flake .
3+
source_url "https://raw.githubusercontent.com/cachix/devenv/95f329d49a8a5289d31e0982652f7058a189bfca/direnvrc" "sha256-d+8cBpDfDBj41inrADaJt+bDWhOktwslgoP5YiGJ1v0="
44

5-
GH_TOKEN="$(gh auth token)"
6-
export GH_TOKEN
5+
use devenv
6+
7+
GITHUB_TOKEN=$(gh auth token)
8+
export GITHUB_TOKEN
79

810
TF_TOKEN=$(jq -rc '.credentials["app.terraform.io"].token' ~/.terraform.d/credentials.tfrc.json)
911
export TF_TOKEN
10-
11-
# export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
12-
# export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
13-
# export OTEL_EXPORTER_OTLP_INSECURE="true"
14-
15-
# export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=http://localhost:4318/v1/logs
16-
# export OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=http/protobuf
17-
# export OTEL_EXPORTER_OTLP_LOGS_INSECURE="true"

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,13 @@ kubeconfig
66

77
go.work
88
go.work.sum
9+
10+
# Devenv
11+
.devenv*
12+
devenv.local.nix
13+
14+
# direnv
15+
.direnv
16+
17+
# pre-commit
18+
.pre-commit-config.yaml

devenv.lock

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
{
2+
"nodes": {
3+
"dagger": {
4+
"inputs": {
5+
"nixpkgs": "nixpkgs"
6+
},
7+
"locked": {
8+
"lastModified": 1726685586,
9+
"owner": "dagger",
10+
"repo": "nix",
11+
"rev": "6085d224e396db78515a8dba93f7de51ed973a31",
12+
"treeHash": "5b04130f94eb789895a77a5ca9996ab81110e7fb",
13+
"type": "github"
14+
},
15+
"original": {
16+
"owner": "dagger",
17+
"repo": "nix",
18+
"type": "github"
19+
}
20+
},
21+
"devenv": {
22+
"locked": {
23+
"dir": "src/modules",
24+
"lastModified": 1726682244,
25+
"owner": "cachix",
26+
"repo": "devenv",
27+
"rev": "bfc6481188a3e7ddda2e745292b737c03949a1ab",
28+
"treeHash": "70531d38530c1903c4e0c152c8e5c8ce18ff0f0f",
29+
"type": "github"
30+
},
31+
"original": {
32+
"dir": "src/modules",
33+
"owner": "cachix",
34+
"repo": "devenv",
35+
"type": "github"
36+
}
37+
},
38+
"flake-compat": {
39+
"flake": false,
40+
"locked": {
41+
"lastModified": 1696426674,
42+
"owner": "edolstra",
43+
"repo": "flake-compat",
44+
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
45+
"treeHash": "2addb7b71a20a25ea74feeaf5c2f6a6b30898ecb",
46+
"type": "github"
47+
},
48+
"original": {
49+
"owner": "edolstra",
50+
"repo": "flake-compat",
51+
"type": "github"
52+
}
53+
},
54+
"gitignore": {
55+
"inputs": {
56+
"nixpkgs": [
57+
"pre-commit-hooks",
58+
"nixpkgs"
59+
]
60+
},
61+
"locked": {
62+
"lastModified": 1709087332,
63+
"owner": "hercules-ci",
64+
"repo": "gitignore.nix",
65+
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
66+
"treeHash": "ca14199cabdfe1a06a7b1654c76ed49100a689f9",
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": 1726583932,
78+
"owner": "NixOS",
79+
"repo": "nixpkgs",
80+
"rev": "658e7223191d2598641d50ee4e898126768fe847",
81+
"treeHash": "34fe30c0e60f1f8c7627caaf643eb6d140478b72",
82+
"type": "github"
83+
},
84+
"original": {
85+
"owner": "NixOS",
86+
"ref": "nixpkgs-unstable",
87+
"repo": "nixpkgs",
88+
"type": "github"
89+
}
90+
},
91+
"nixpkgs-stable": {
92+
"locked": {
93+
"lastModified": 1726447378,
94+
"owner": "NixOS",
95+
"repo": "nixpkgs",
96+
"rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1",
97+
"treeHash": "0484595757634aa3d99beca878bc480d9b2eed67",
98+
"type": "github"
99+
},
100+
"original": {
101+
"owner": "NixOS",
102+
"ref": "nixos-24.05",
103+
"repo": "nixpkgs",
104+
"type": "github"
105+
}
106+
},
107+
"nixpkgs_2": {
108+
"locked": {
109+
"lastModified": 1726583932,
110+
"owner": "NixOS",
111+
"repo": "nixpkgs",
112+
"rev": "658e7223191d2598641d50ee4e898126768fe847",
113+
"treeHash": "34fe30c0e60f1f8c7627caaf643eb6d140478b72",
114+
"type": "github"
115+
},
116+
"original": {
117+
"owner": "NixOS",
118+
"ref": "nixpkgs-unstable",
119+
"repo": "nixpkgs",
120+
"type": "github"
121+
}
122+
},
123+
"pre-commit-hooks": {
124+
"inputs": {
125+
"flake-compat": "flake-compat",
126+
"gitignore": "gitignore",
127+
"nixpkgs": [
128+
"nixpkgs"
129+
],
130+
"nixpkgs-stable": "nixpkgs-stable"
131+
},
132+
"locked": {
133+
"lastModified": 1726745158,
134+
"owner": "cachix",
135+
"repo": "pre-commit-hooks.nix",
136+
"rev": "4e743a6920eab45e8ba0fbe49dc459f1423a4b74",
137+
"treeHash": "56fbe2a9610b3ad9163a74011131e7624f6b3b81",
138+
"type": "github"
139+
},
140+
"original": {
141+
"owner": "cachix",
142+
"repo": "pre-commit-hooks.nix",
143+
"type": "github"
144+
}
145+
},
146+
"root": {
147+
"inputs": {
148+
"dagger": "dagger",
149+
"devenv": "devenv",
150+
"nixpkgs": "nixpkgs_2",
151+
"pre-commit-hooks": "pre-commit-hooks"
152+
}
153+
}
154+
},
155+
"root": "root",
156+
"version": 7
157+
}

devenv.nix

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{ pkgs, inputs, ... }:
2+
3+
{
4+
packages = [
5+
pkgs.git
6+
pkgs.nixfmt-rfc-style
7+
inputs.dagger.packages.${pkgs.stdenv.system}.dagger
8+
];
9+
10+
languages = {
11+
nix.enable = true;
12+
go.enable = true;
13+
go.package = pkgs.go_1_23;
14+
};
15+
16+
pre-commit.hooks = {
17+
treefmt = {
18+
enable = true;
19+
};
20+
};
21+
22+
languages.python.enable = true;
23+
24+
# https://github.com/cachix/devenv/pull/1317
25+
# treefmt = {
26+
# programs.nixfmt.enable = true;
27+
# programs.nixfmt.package = pkgs.nixfmt-rfc-style;
28+
# };
29+
}

devenv.yaml

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

treefmt.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# One CLI to format the code tree - https://github.com/numtide/treefmt
2+
3+
[formatter.nix]
4+
command = "nixfmt"
5+
includes = ["*.nix"]

0 commit comments

Comments
 (0)