Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add formatter flake output (nixpkgs-fmt) #220

Closed
wants to merge 2 commits into from

Conversation

RobWalt
Copy link
Contributor

@RobWalt RobWalt commented Mar 19, 2024

Implements the suggestion from here #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.

Copy link
Owner

@astro astro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your effort. I am terribly sorry but I am still not happy with the state of Nix formatting in 2024.

Comment on lines +91 to +92
}
{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These curly braces being on different indentation levels illustrates well why I don't like any of the current formatters.

inherit self nixpkgs system hypervisor;
};
in
builtins.foldl'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this formatting.

@RobWalt
Copy link
Contributor Author

RobWalt commented Mar 20, 2024

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.

@RobWalt RobWalt closed this Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants