# Pedantix - the pedantic nix formatter

DevFeed: [Pedantix - the pedantic nix formatter](<https://devfeed.tech/articles/pedantix-the-pedantic-nix-formatter-31362.md>)

Original publisher: [Read original article](<https://discourse.nixos.org/t/pedantix-the-pedantic-nix-formatter/79039>)

Author: Swarsel

Published: 2026-07-18T21:25:52Z

Content type: release

Language: en

Sources: [Announcements - NixOS Discourse](<https://devfeed.tech/sources/announcements-nixos-discourse.md>)

Topics: [Nix](<https://devfeed.tech/topics/nix.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [announcements](<https://devfeed.tech/tags/announcements.md>), [development](<https://devfeed.tech/tags/development.md>), [release](<https://devfeed.tech/tags/release.md>)

## AI overview

This discussion announces the first stable release of pedantix, a customizable formatter for Nix files. It builds on a formatter of the user's choice and applies uniform ordering and structure across Nix files. The author reports that their configuration migrated without issues and that nixpkgs still evaluated fully after testing.

## Source excerpt

So over the last years, it constantly bothered me that expressions in my nix files were never sorted enough to my liking even after using the available formatters like nixfmt; examples would be module arguments ({lib, config ...} vs {config, lib, ...}) but also the attribute sets themselves. Since nix does not work line-by-line, it makes in my mind not a lot of sense to apply custom ordering to attributes rather than a uniform one (except for maybe let and rec). For the last one or so weeks, I was working on a solution to this "problem", which I coined "the pedantic Nix formatter", or pedantix in short. It builds on top of your base formatter of choice (and stays in compliance with it) and is basically fully customizable to your liking. It ensures a fully uniform structure between all of your nix files After migrating my own config to it without any issues arising, I decided today that this marks the first stable release. Also, I threw it against nixpkgs to see how the future could look like when using pedantix you can find that result here. Nixpkgs still fully evaluated after that, so I guess it is safe for you to trust it with your own config I thought this might be useful for other people as well, so here you go! You can check it out at: GitHub - Swarsel/pedantix: The pedantic nix formatter - GitHub. 14 posts - 5 participants Read full topic