Skip to content

Commit 0afbc97

Browse files
committed
feat: make Claude Code, Codex, Gemini CLI and Goose automatically available in the Nix env
1 parent fce4d69 commit 0afbc97

File tree

2 files changed

+112
-8
lines changed

2 files changed

+112
-8
lines changed

flake.lock

Lines changed: 80 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
{
22
description = "agents-workflow";
33

4-
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6+
codex.url = "github:openai/codex";
7+
codex.inputs.nixpkgs.follows = "nixpkgs";
8+
};
59

610
outputs = {
711
self,
812
nixpkgs,
13+
codex,
914
}: let
1015
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
1116
forAllSystems = nixpkgs.lib.genAttrs systems;
1217
in {
1318
packages = forAllSystems (
1419
system: let
15-
pkgs = import nixpkgs {inherit system;};
20+
pkgs = import nixpkgs {
21+
inherit system;
22+
config.allowUnfree = true; # Allow unfree packages like claude-code
23+
};
1624
agent-task-script = pkgs.writeShellScriptBin "agent-task" ''
17-
PATH=${pkgs.lib.makeBinPath [ pkgs.ruby pkgs.codex pkgs.goose ]}:$PATH
25+
PATH=${pkgs.lib.makeBinPath [
26+
pkgs.ruby
27+
pkgs.goose-cli
28+
pkgs.claude-code
29+
pkgs.gemini-cli
30+
codex.packages.${system}.codex-rs
31+
]}:$PATH
1832
exec ruby ${./bin/agent-task} "$@"
1933
'';
2034
get-task = pkgs.writeShellScriptBin "get-task" ''
@@ -25,7 +39,7 @@
2539
'';
2640
agent-utils = pkgs.symlinkJoin {
2741
name = "agent-utils";
28-
paths = [ get-task start-work ];
42+
paths = [get-task start-work];
2943
};
3044
in {
3145
agent-task = agent-task-script;
@@ -42,7 +56,10 @@
4256
});
4357

4458
devShells = forAllSystems (system: let
45-
pkgs = import nixpkgs {inherit system;};
59+
pkgs = import nixpkgs {
60+
inherit system;
61+
config.allowUnfree = true; # Allow unfree packages like claude-code
62+
};
4663
in {
4764
default = pkgs.mkShell {
4865
buildInputs = [
@@ -53,7 +70,17 @@
5370
pkgs.git
5471
pkgs.fossil
5572
pkgs.mercurial
73+
74+
# AI Coding Assistants (latest versions from nixpkgs-unstable)
75+
pkgs.goose-cli # Goose AI coding assistant
76+
pkgs.claude-code # Claude Code - agentic coding tool
77+
pkgs.gemini-cli # Gemini CLI
78+
codex.packages.${system}.codex-rs # OpenAI Codex CLI (native Rust implementation)
5679
];
80+
81+
shellHook = ''
82+
echo "Agent workflow development environment loaded"
83+
'';
5784
};
5885
});
5986
};

0 commit comments

Comments
 (0)