NixOS/nixfmt

RFC 166 implementation tracking issue

infinisil opened this issue · 14 comments

Now that RFC 166 is accepted, let's commence with the implementation!

Here's a very rough todo-list, most of which will be fairly quick.

  • Update README to mention WIP state: #154
  • Create Nix formatting GitHub team: https://github.com/orgs/NixOS/teams/nix-formatting/members
    • Add @Sereja313 to the team, couldn't do that myself since they're not already in the organisation. This was requested in the issue below
  • Move repo under NixOS org: #155
  • Decide on merge rules: https://github.com/NixOS/nixfmt/rules/523613?ref=refs%2Fheads%2Fmaster
  • Create a team page in the repo: #156
  • Create a GitHub project board
    Let's only start using one if we feel the need for it
  • Create a nixos.org page for the team: NixOS/nixos-homepage#1337
  • Move the RFCs initial standard format into the repo: #158
  • Merge #118
  • Set up automated testing
    • Run test suite in CI: #172
    • Each PR needs to be tested on the entirety of Nixpkgs: #163
  • Fully review the code
    • Check that it conforms to the specification
    • Document sufficiently
    • Simplify if possible
  • Tool documentation
  • Create a release and announce it
    • Marketing, celebration, Discourse, blog post, NixCon talk, etc.
    • Update Nixpkgs and Nix docs, e.g. contributor guide, etc.
  • Update nix fmt to point to nixfmt: NixOS/nix#11252
  • Reformat Nixpkgs: NixOS/nixpkgs#322520
    • Also on other repos
    • Also, Nix code in documentation and elsewhere

Ping @piegamesde @tomberek @0x4A6F @Sereja313 @dasJ

Proposal: do reformatting in the NixOS org with a few non-nixpkgs repos first

Proposal: After what @tomberek suggested is done and successful, do formatting of Nixpkgs in a subset of Nixpkgs first (i.e. pkgs/by-name/)

https://github.com/Kreyren/nixos-config/blob/dc0dbb6f15c4d8656b26220645793a06d10fa3ea/nixos/users/kreyren/home/modules/prompts/starship/starship.nix#L3-L14 (best seen in raw)

RFC @infinisil Is this known issue that is actionable by RFC166? I read through it don't see it anywhere (if tabs are used it causes the prompt to be rendered with long indentation instead of the indentation being removed from the declaration, affects most of nix modules)

This looks unlikely to be a desired output according to the RFC format. Now that the PR is merged, please simply open an issue for it.

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/formatting-team-meeting-2024-03-19/41845/1

This looks unlikely to be a desired output according to the RFC format. Now that the PR is merged, please simply open an issue for it. -- @piegamesde (#153 (comment))

Referencing comment by @roberth in NixOS/nix#8874 (comment)

Got referred to RFC166 from RFC137 about this issue in relation to addressing NixOS/nix#8874

@Kreyren please just open a new issue with input, current output and desired output and I'll look at it. Simply linking to weird looking code does not give me enough context to understand the situation.

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-56/43035/1

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/enforcing-nix-formatting-in-nixpkgs/49506/3

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/enforcing-nix-formatting-in-nixpkgs/49506/8

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/satisfaction-survey-from-the-new-rfc-166-formatting/49758/1

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/why-does-the-nixos-infrastructure-have-to-be-hosted-in-a-centralized-way/46789/36