-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
291 lines (251 loc) · 9.51 KB
/
flake.nix
File metadata and controls
291 lines (251 loc) · 9.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
{
description = "Nix flakes for utility tools";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
# Steve Yegge's AI coding tools
gastown-src = {
url = "github:steveyegge/gastown";
flake = false;
};
beads-src = {
url = "github:steveyegge/beads";
flake = false;
};
microforge-src = {
url = "github:zach-source/microforge";
flake = false;
};
};
outputs =
{
self,
nixpkgs,
flake-utils,
gastown-src,
beads-src,
microforge-src,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
nixfleet = pkgs.stdenv.mkDerivation rec {
pname = "nixfleet";
version = "0.1.5"; # nixfleet
src =
let
selectSystem =
if pkgs.stdenv.isDarwin then
if pkgs.stdenv.isAarch64 then
{
url = "https://github.com/zach-source/nix-fleet/releases/download/v${version}/nixfleet-darwin-arm64.tar.gz";
sha256 = "ec06100a2391a90dc3f23954612538be21f83c171d9cbaebfd66e13aff040e8e"; # darwin-arm64
binaryName = "nixfleet-darwin-arm64";
}
else
{
url = "https://github.com/zach-source/nix-fleet/releases/download/v${version}/nixfleet-darwin-amd64.tar.gz";
sha256 = "565cd04f9c8f29b36f96cfde82606ba129b240c9cde6d756dd55098eb25f7d42"; # darwin-amd64
binaryName = "nixfleet-darwin-amd64";
}
else if pkgs.stdenv.isAarch64 then
{
url = "https://github.com/zach-source/nix-fleet/releases/download/v${version}/nixfleet-linux-arm64.tar.gz";
sha256 = "9577c7b0032f0ee66ab72a15cc3ed061c0bb248f1ff438f8819969f63532ed6c"; # linux-arm64
binaryName = "nixfleet-linux-arm64";
}
else
{
url = "https://github.com/zach-source/nix-fleet/releases/download/v${version}/nixfleet-linux-amd64.tar.gz";
sha256 = "24e1c3f50be0b1452d16aadb14ae816a9b4bbd24d94cd2b72ac0a0323d5c65cb"; # linux-amd64
binaryName = "nixfleet-linux-amd64";
};
in
pkgs.fetchurl {
inherit (selectSystem) url sha256;
};
binaryName =
if pkgs.stdenv.isDarwin then
if pkgs.stdenv.isAarch64 then "nixfleet-darwin-arm64" else "nixfleet-darwin-amd64"
else if pkgs.stdenv.isAarch64 then
"nixfleet-linux-arm64"
else
"nixfleet-linux-amd64";
unpackPhase = ''
runHook preUnpack
mkdir -p source
cd source
tar -xzf $src
runHook postUnpack
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ${binaryName} $out/bin/nixfleet
chmod +x $out/bin/nixfleet
runHook postInstall
'';
meta = with pkgs.lib; {
description = "Fleet management CLI for deploying Nix configurations to non-NixOS hosts";
homepage = "https://github.com/zach-source/nix-fleet";
license = licenses.mit;
maintainers = [ ];
platforms = platforms.unix;
};
};
claude-mon = pkgs.stdenv.mkDerivation rec {
pname = "claude-mon";
version = "0.1.0"; # claude-mon
src =
let
selectSystem =
if pkgs.stdenv.isDarwin then
if pkgs.stdenv.isAarch64 then
{
url = "https://github.com/zach-source/claude-mon/releases/download/v${version}/claude-mon-darwin-arm64.tar.gz";
sha256 = "0000000000000000000000000000000000000000000000000000000000000000"; # darwin-arm64 # claude-mon
binaryName = "claude-mon-darwin-arm64";
}
else
{
url = "https://github.com/zach-source/claude-mon/releases/download/v${version}/claude-mon-darwin-amd64.tar.gz";
sha256 = "0000000000000000000000000000000000000000000000000000000000000000"; # darwin-amd64 # claude-mon
binaryName = "claude-mon-darwin-amd64";
}
else if pkgs.stdenv.isAarch64 then
{
url = "https://github.com/zach-source/claude-mon/releases/download/v${version}/claude-mon-linux-arm64.tar.gz";
sha256 = "0000000000000000000000000000000000000000000000000000000000000000"; # linux-arm64 # claude-mon
binaryName = "claude-mon-linux-arm64";
}
else
{
url = "https://github.com/zach-source/claude-mon/releases/download/v${version}/claude-mon-linux-amd64.tar.gz";
sha256 = "0000000000000000000000000000000000000000000000000000000000000000"; # linux-amd64 # claude-mon
binaryName = "claude-mon-linux-amd64";
};
in
pkgs.fetchurl {
inherit (selectSystem) url sha256;
};
binaryName =
if pkgs.stdenv.isDarwin then
if pkgs.stdenv.isAarch64 then "claude-mon-darwin-arm64" else "claude-mon-darwin-amd64"
else if pkgs.stdenv.isAarch64 then
"claude-mon-linux-arm64"
else
"claude-mon-linux-amd64";
unpackPhase = ''
runHook preUnpack
mkdir -p source
cd source
tar -xzf $src
runHook postUnpack
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ${binaryName} $out/bin/claude-mon
chmod +x $out/bin/claude-mon
# Create symlink for short name
ln -s $out/bin/claude-mon $out/bin/clmon
runHook postInstall
'';
meta = with pkgs.lib; {
description = "TUI application for watching Claude Code edits in real-time and managing prompts";
homepage = "https://github.com/zach-source/claude-mon";
license = licenses.mit;
maintainers = [ ];
platforms = platforms.unix;
};
};
# Beads - git-backed graph issue tracker for AI coding agents
beads = pkgs.buildGoModule {
pname = "beads";
version = "0.47.1"; # beads
src = beads-src;
vendorHash = "sha256-YU+bRLVlWtHzJ1QPzcKJ70f+ynp8lMoIeFlm+29BNPE="; # beads
subPackages = [ "cmd/bd" ];
nativeCheckInputs = [ pkgs.git ];
# Some tests require git worktree features not available in sandbox
doCheck = false;
ldflags = [
"-s"
"-w"
"-X main.version=0.47.1"
];
meta = with pkgs.lib; {
description = "Distributed, git-backed graph issue tracker for AI coding agents";
homepage = "https://github.com/steveyegge/beads";
license = licenses.asl20;
maintainers = [ ];
mainProgram = "bd";
};
};
# Gastown - multi-agent orchestration system for Claude Code
gastown = pkgs.buildGoModule {
pname = "gastown";
version = "0.5.0"; # gastown
src = gastown-src;
vendorHash = "sha256-ripY9vrYgVW8bngAyMLh0LkU/Xx1UUaLgmAA7/EmWQU="; # gastown
subPackages = [ "cmd/gt" ];
ldflags = [
"-s"
"-w"
];
meta = with pkgs.lib; {
description = "Multi-agent orchestration system for Claude Code";
homepage = "https://github.com/steveyegge/gastown";
license = licenses.asl20;
maintainers = [ ];
mainProgram = "gt";
};
};
# Microforge - Claude Code agent orchestration for microservices
mforge = pkgs.buildGoModule {
pname = "mforge";
version = "0.1.0"; # mforge
src = microforge-src;
vendorHash = "sha256-uAtP5pVK38u7gdDAUVtHww6hxnOLKGBLzIF+qWZgexY=";
subPackages = [ "cmd/mforge" ];
ldflags = [
"-s"
"-w"
];
meta = with pkgs.lib; {
description = "CLI that orchestrates Claude Code agents as a multi-role system for microservices";
homepage = "https://github.com/zach-source/microforge";
license = licenses.mit;
maintainers = [ ];
mainProgram = "mforge";
};
};
in
{
packages = {
inherit nixfleet;
inherit claude-mon;
inherit beads;
inherit gastown;
inherit mforge;
default = nixfleet;
};
homeManagerModules = {
claude-mon = import ./modules/claude-mon.nix;
default = claude-mon;
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
go
gopls
golangci-lint
];
shellHook = ''
echo "Development environment for nix-packages"
echo "Available tools: go, gopls, golangci-lint"
'';
};
}
);
}