replace nixpkgs-fmt with nixfmt-rfc-style

This commit is contained in:
Jörg Thalheim 2024-08-15 08:39:41 +02:00
parent a51bd670d6
commit 5f8bbf7681
10 changed files with 127 additions and 89 deletions

View file

@ -1,30 +1,32 @@
{ inputs, ... }: {
imports = [
inputs.treefmt-nix.flakeModule
];
{ inputs, ... }:
{
imports = [ inputs.treefmt-nix.flakeModule ];
perSystem = {
treefmt = {
# Used to find the project root
projectRootFile = ".git/config";
perSystem =
{ pkgs, ... }:
{
treefmt = {
# Used to find the project root
projectRootFile = ".git/config";
programs = {
deadnix.enable = true;
deno.enable = true;
mypy.enable = true;
ruff.check = true;
ruff.format = true;
nixpkgs-fmt.enable = true;
shellcheck.enable = true;
shfmt.enable = true;
statix.enable = true;
yamlfmt.enable = true;
};
programs = {
deadnix.enable = true;
deno.enable = true;
mypy.enable = true;
ruff.check = true;
ruff.format = true;
nixfmt.enable = true;
nixfmt.package = pkgs.nixfmt-rfc-style;
shellcheck.enable = true;
shfmt.enable = true;
statix.enable = true;
yamlfmt.enable = true;
};
settings.formatter = {
shellcheck.includes = [ "direnvrc" ];
shfmt.includes = [ "direnvrc" ];
settings.formatter = {
shellcheck.includes = [ "direnvrc" ];
shfmt.includes = [ "direnvrc" ];
};
};
};
};
}