anyclaude/flake.nix
Thomas Kosiewski 46362efe73
Add Nix development environment and Claude guidance file
Change-Id: I4b3e2f0020409ee3f8b9e75633c901de94bd78d7
Signed-off-by: Thomas Kosiewski <tk@coder.com>
2025-08-08 15:10:26 +02:00

55 lines
1.4 KiB
Nix

{
description = "AnyClaude development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs = { self, nixpkgs, flake-utils, treefmt-nix }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
treefmt = treefmt-nix.lib.evalModule pkgs {
projectRootFile = "flake.nix";
programs = {
nixpkgs-fmt.enable = true;
shfmt.enable = true;
shellcheck.enable = true;
};
};
in
{
# Format the source tree
formatter = treefmt.config.build.wrapper;
# Check formatting
checks.formatting = treefmt.config.build.check self;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
# Primary runtime and package manager
bun
# Node.js for compatibility (required by some tools)
nodejs_22
# Code quality tools (already included by treefmt)
treefmt.config.build.wrapper
# Version control
git
# Utilities
jq
ripgrep
bat
];
# Environment variables
NODE_ENV = "development";
};
});
}