Rensa is a powerful and flexible Nix flake framework designed to organize your Nix projects into logical units called "Cells". It is heavily inspired by divnix/std but aims to provide a streamlined experience. Feel free to check out std's awesome docs too.
- Cells: Organize your code into functional domains (e.g.,
backend,frontend,devops). - Blocks: Define types of outputs within a cell (e.g.,
packages,devShells,nixosConfigurations). - Actions: Integrate with the CLI to run commands defined in your cells.
- Cell Flakes: Each cell can be its own flake, allowing for modular dependency management.
- Initialize a Flake: Create a
flake.nixthat usesrensa. - Define Cells: Create a
cells/directory. - Add Blocks: Add
.nixfiles in your cells to define outputs.
{inputs={nixpkgs.url="github:nixos/nixpkgs/nixpkgs-unstable";ren.url="gitlab:rensa-nix/core";};outputs={ren, ...}@inputs: ren.buildWith{inheritinputs;cellsFrom=./cells;cellBlocks=withren.blocks;[(simple"packages")(simple"devShells")];}{packages=ren.selectinputs.self[["my-cell""packages"]];};}See the docs for more.