feat: improve formatting

This commit is contained in:
Leon Schwarzäugl 2025-11-14 00:29:55 +01:00 committed by Leon Schwarzäugl
parent 4a6cbd763f
commit 47377f7a96
5 changed files with 89 additions and 6 deletions

View file

@ -1,6 +1,28 @@
_:
{ inputs, ... }:
{
imports = [
inputs.treefmt-nix.flakeModule
];
perSystem = { pkgs, ... }: {
formatter = pkgs.nixpkgs-fmt;
# formatter = pkgs.nixpkgs-fmt;
# formatter is set by treefmt to:
# formatter = lib.mkIf config.treefmt.flakeFormatter (lib.mkDefault config.treefmt.build.wrapper);
treefmt = {
projectRootFile = "flake.nix";
programs = {
nixfmt = {
enable = true;
package = pkgs.nixpkgs-fmt;
};
deadnix.enable = true;
statix.enable = true;
shellcheck.enable = true;
};
settings.formatter.shellcheck.options = [
"--shell"
"bash"
];
};
};
}