Add formatting pre-commit hook

This commit is contained in:
Pim Kunis 2024-10-28 16:08:07 +01:00
parent 8160b9da0b
commit 8f461f6ced
4 changed files with 18 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.direnv
.pre-commit-config.yaml

View file

@ -52,5 +52,6 @@
./scripts
./globals.nix
./formatter.nix
./shell.nix
];
}

14
shell.nix Normal file
View file

@ -0,0 +1,14 @@
{
self,
flake-utils,
nixpkgs,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook;
buildInputs = self.checks.${system}.pre-commit-check.enabledPackages;
};
})