astro / microvm.nix

NixOS MicroVMs
https://astro.github.io/microvm.nix/
MIT License
1.24k stars 93 forks source link

add `formatter` flake output (`nixpkgs-fmt`) #220

Closed RobWalt closed 5 months ago

RobWalt commented 5 months ago

Implements the suggestion from here https://github.com/astro/microvm.nix/issues/35 and uses nixpkgs-fmt. I opted for it since it looked the least weird. IMO alejandra has not enough spacing and nixfmt uses a bit too much.

Anyways, feel free to suggest using another formatter. I just want to have a consistent formatting here which I can apply right before committing so that my own auto-formatting isn't getting in the way 😅

I separated adding the formatter and formatting the code here into two commits so we could optionally omit the latter and do the actual formatting later to prevent merge conflicts.

RobWalt commented 5 months ago

Tbh, I fully agree, the curly braces look awful 😖 In the end I just wanted to make collaboration easier by having enforced standards, even if they're shitty. But I'm not going to waste our time any further with this and will just disable my autoformatting in the future.