Development Shell and Checks
cells/dev/shell.nix defines the development environment for editing the flake itself.
Up: NixOS Flakes Dendritic System Setup
Down: cells overlays
What this node does
The dev shell uses flake-parts perSystem to define supported systems, import nixpkgs with the flake overlay, expose nixfmt as the formatter, define checks, and create devShells.default.
config.perSystem = { config, pkgs, system, ... }: {
formatter = pkgs.nixfmt;
checks = {
deadnix = pkgs.runCommand "deadnix-check" { } ''
deadnix --fail cells flake.nix
touch "$out"
'';
};
};Why it exists
The flake should carry its own authoring tools. A contributor can enter nix develop and get the same formatter, language servers, linters, and pre-commit environment used by the repository.
Tooling included
- Nix formatters and linters:
nixfmt,statix,deadnix. - Nix language servers and inspection tools:
nil,nixd,nix-diff,nix-tree,nix-output-monitor,nvd,nh. - General authoring tools: Git, Neovim, EditorConfig checker, Commitlint, and Just.