shell: Introduce treefmt
Introduces treefmt with a simple nixfmt-rfc-style configuration to format all Nix files. This is only practically usable with the following commit that formats all files accordingly.
This commit is contained in:
committed by
Silvan Mosberger
parent
02b2743b6a
commit
398e74f70b
@@ -16,7 +16,7 @@
|
||||
nixpkgs ? null,
|
||||
}:
|
||||
let
|
||||
inherit (import ./ci { inherit nixpkgs system; }) pkgs;
|
||||
inherit (import ./ci { inherit nixpkgs system; }) pkgs fmt;
|
||||
|
||||
# For `nix-shell -A hello`
|
||||
curPkgs = builtins.removeAttrs (import ./. { inherit system; }) [
|
||||
@@ -28,10 +28,10 @@ let
|
||||
in
|
||||
curPkgs
|
||||
// pkgs.mkShellNoCC {
|
||||
inputsFrom = [
|
||||
fmt.shell
|
||||
];
|
||||
packages = with pkgs; [
|
||||
# The default formatter for Nix code
|
||||
# See https://github.com/NixOS/nixfmt
|
||||
nixfmt-rfc-style
|
||||
# Helper to review Nixpkgs PRs
|
||||
# See CONTRIBUTING.md
|
||||
nixpkgs-review
|
||||
|
||||
Reference in New Issue
Block a user