{
description = "Module-based environments for coding agents (Claude Code, Codex)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
claude-code = {
url = "github:sadjow/claude-code-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
codex = {
url = "github:sadjow/codex-cli-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
claude-code,
codex,
}:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
in
{
lib = import ./lib {
inherit (nixpkgs) lib;
defaultPackages = system: {
claude = claude-code.packages.${system}.default;
codex = codex.packages.${system}.default;
};
};
packages = forAllSystems (pkgs: {
default =
(self.lib.mkEnvironment {
inherit pkgs;
modules = [ ./environments/default.nix ];
}).package;
});
checks = forAllSystems (pkgs: import ./checks { inherit pkgs self; });
formatter = forAllSystems (pkgs: pkgs.nixfmt);
};
}