Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Nix
  3. statix

statix

MITRustv0.5.8

A linter and fixer for the Nix programming language that highlights antipatterns and provides automated fixes.

GitHubGitHub
945 stars43 forks0 contributors

What is statix?

Statix is a linter and fixer for the Nix programming language that identifies antipatterns and provides automated corrections. It helps developers write cleaner, more idiomatic Nix code by highlighting issues like unnecessary assignments or legacy syntax. The tool works purely on the AST level without evaluating Nix code, making it fast and reliable.

Target Audience

Nix developers and infrastructure engineers who write or maintain Nix expressions and want to improve code quality and consistency.

Value Proposition

Statix offers a dedicated, fast linter for Nix with automated fixes, unlike general-purpose linters that may not understand Nix-specific patterns. Its integration with `.gitignore` and configurable lint rules make it practical for real-world projects.

Overview

lints and suggestions for the nix programming language

Use Cases

Best For

  • Enforcing code style and best practices in Nix projects
  • Automatically fixing common Nix antipatterns like manual inherit statements
  • Integrating linting into CI/CD pipelines for Nix codebases
  • Improving readability and maintainability of complex Nix expressions
  • Onboarding new developers to Nix by highlighting idiomatic patterns
  • Checking large Nix codebases quickly without evaluation overhead

Not Ideal For

  • Projects needing semantic analysis of Nix code (e.g., to catch import errors or runtime issues)
  • Teams with highly customized Nix coding styles that conflict with Statix's default lints
  • One-off Nix scripts where linting setup overhead outweighs benefits

Pros & Cons

Pros

Fast Syntactic Analysis

Statix performs pure AST-based checks without evaluating Nix code, making it lightweight and fast for large codebases, as highlighted in its philosophy.

Automated Fixes

The `fix` command automatically corrects common antipatterns like manual inherit statements, demonstrated in the README examples.

Flexible Configuration

Allows disabling specific lints via a statix.toml file and respects .gitignore by default, easing integration into existing workflows.

Multiple Output Formats

Supports JSON and errfmt outputs for easy integration with editors and CI/CD, mentioned in the usage section.

Cons

No Semantic Evaluation

It cannot detect issues related to Nix evaluation, such as missing dependencies or attribute errors, limiting its ability to catch deeper bugs.

Installation Complexity

Requires Nix flakes or brew for setup, which may be cumbersome for users not already embedded in the Nix ecosystem.

Limited Lint Coverage

The fixed list of lints may not cover all Nix antipatterns, and development depends on the rnix-parser crate, potentially lagging behind language updates.

Frequently Asked Questions

Quick Stats

Stars945
Forks43
Contributors0
Open Issues38
Last commit1 month ago
CreatedSince 2021

Tags

#developer-tools#automated-fixes#linter#cli-tool#code-quality#nix-ecosystem#nix#static-analysis

Built With

R
Rust
r
rnix-parser

Included in

Nix5.0k
Auto-fetched 9 hours ago

Related Projects

devenvdevenv

Fast, Declarative, Reproducible, and Composable Developer Environments using Nix

Stars7,595
Forks557
Last commit15 hours ago
nhnh

Yet another Nix CLI helper. [Maintainers=@NotAShelf, @faukah]

Stars3,181
Forks125
Last commit18 hours ago
commacomma

Comma runs software without installing it. [maintainers=@Artturin,@burke,@DavHau]

Stars1,757
Forks62
Last commit6 days ago
nix-output-monitornix-output-monitor

Pipe your nix-build output through the nix-output-monitor a.k.a nom to get additional information while building.

Stars1,652
Forks55
Last commit11 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub