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:
- Adds support for
nixfmt as a formatter plugin for Nix files.
- 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:
Trunk Code Quality currently supports
nixpkgs-fmtfor formatting Nix files. However,nixpkgs-fmthas been officially deprecated by the Nix community. The upstream repository explicitly states thatnixfmt(specifically following RFC 166) is the new standard replacement.Continuing to default to or recommend
nixpkgs-fmtwill eventually lead to friction for Nix users adopting the ecosystem's current standards.Describe the solution you'd like
I request that Trunk:
nixfmtas a formatter plugin for Nix files.nixpkgs-fmtas deprecated within Trunk to reflect its upstream status and encourage users to migrate.Describe alternatives you've considered
Users could implement
nixfmtas a custom linter locally, but given that Nix is a common language andnixfmtis 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: