Skip to content

move nixfmt instructions to FAQ #1131

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

Merged
merged 2 commits into from
May 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _redirects
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
/manual/nix/unstable/* https://hydra.nixos.org/job/nix/master/manual/latest/download/1/manual/:splat 200
/manual/nix/development/* https://hydra.nixos.org/job/nix/master/manual/latest/download/1/manual/:splat 200
/tutorials/nixos/continuous-integration-github-actions /guides/recipes/continuous-integration-github-actions 301

/guides/recipes/autoformatting /guides/faq#how-to-format-nix-language-code-automatically 301
7 changes: 7 additions & 0 deletions source/guides/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Nix

### How to format Nix language code automatically?

[`nixfmt`](https://github.com/NixOS/nixfmt) is the official formatter for {term}`Nix language` code.
Please refer to its source repository for installation instructions.

`nixfmt` is [used to format all code](https://github.com/NixOS/nixpkgs/blob/master/ci/default.nix) in {term}`Nixpkgs`.

### How to convert between paths and strings in the Nix language?

See the Nix reference manual on [string interpolation](https://nix.dev/manual/nix/2.19/language/string-interpolation) and [operators on paths and strings](https://nix.dev/manual/nix/2.19/language/operators#string-concatenation)
Expand Down
56 changes: 0 additions & 56 deletions source/guides/recipes/autoformatting.md

This file was deleted.

1 change: 0 additions & 1 deletion source/guides/recipes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ Managing remote sources <./dependency-management.md>
Python development environment <./python-environment.md>
post-build-hook.md
continuous-integration-github-actions.md
autoformatting.md
```
Loading