Skip to content

Deprecate nixpkgs-fmt and add support for nixfmt #1125

@averev

Description

@averev

Trunk Code Quality currently supports nixpkgs-fmt for formatting Nix files. However, nixpkgs-fmt has been officially deprecated by the Nix community. The upstream repository explicitly states that nixfmt (specifically following RFC 166) is the new standard replacement.

Continuing to default to or recommend nixpkgs-fmt will eventually lead to friction for Nix users adopting the ecosystem's current standards.

Describe the solution you'd like
I request that Trunk:

  1. Adds support for nixfmt as a formatter plugin for Nix files.
  2. Marks nixpkgs-fmt as deprecated within Trunk to reflect its upstream status and encourage users to migrate.

Describe alternatives you've considered
Users could implement nixfmt as a custom linter locally, but given that Nix is a common language and nixfmt is the official standard, it should be natively supported in the Trunk plugins registry.

Additional context
Here are the relevant links confirming the deprecation and the new standard:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions