Show HN: Flakegarden, shadcn-esque Nix flakes

1 month ago 8

A shadcn-like CLI to compose language/tooling modules into your Nix flakes.

Think: shadcn/ui, but for nix. Use flakegarden to add opinionated, ready-to-use modules (e.g., Python) into your project under nix/, so you can bootstrap devshells, tooling, and packaging with minimal fuss.

  • Provide a catalog of language/tooling modules (python, ts, rust, …)
  • Let you add modules incrementally via a friendly CLI
  • Keep modules as plain nix files in your repo (auditable, editable)
  • Work with flakes and flake-parts setups

Initialize a flake:

nix flake init -t "github:losnappas/flakegarden"

Add modules you need, via the picker:

$ flakegarden add

Or directly

$ flakegarden add python

Files will be added to ./nix/garden/[file].nix, and you can modify them as you will.

$ git add nix/garden

You will then be able to nix develop, the modules are merged into the default shell.

direnv users: use direnv reload after adding or modifying a flakegarden file.

Read Entire Article