See the original reason for this here:
https://github.com/NixOS/nixpkgs/pull/258571.
While it seems the original reason may not be valid anymore since
`nixos-rebuild` do not allocate TTY in SSH, it seems that some people
depends on the `nixos-rebuild-switch-to-configuration` to exist.
This reverts commit 65a333600d.
This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.
It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).
A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.
[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
It was removed in 68472b90a6 because it
was out of date, using the old build system. Now, it is up to date, and
uses the Meson build system and the per-component build.
I am especially keen to get this is because once 2.28 uses the
monolithic build (#393509) out of an abundance of caution, this is will
be the only use of the per-component build, until the next Nix version
(and Nix 2.28 on master after Nixpkgs 25.05 is forked off and released).
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:
nix-build ci -A fmt.check
This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).
This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).
Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).
If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
Because we want to be able to list variants even if one of them might
not eval correctly.
The eager evaluation was caused by us querying for the resulting image
file name to early and is fixed by calling nix-instantiate/nix eval
twice now, once for the variants, once for the image file name.
fixes#394626
Refactor the new `nixfmt-tree` package, to make use of the new
`treefmt.withConfig` wrapper.
Breaking changes:
1. Overriding `settings` will no longer entirely replace all settings,
instead settings are now merged as modules.
2. Adding the package to a nix shell will no longer make runtime inputs
(such as `nixfmt`) available on the PATH, only the wrapped `treefmt`
will be added to the shell's PATH.
Non-breaking changes:
1. Introduced `runtimeInputs`, for consistency with `treefmt.withConfig`
and other parts of nixpkgs, such as `writeShellApplication`.
2. Introduced `nixfmtPackage` to allow specifying a different nixfmt
package, without having to know to override `nixfmt-rfc-style`.
3. Deprecated `runtimePackages` with a warning. Use the new args
instead.