Add formatting pre-commit hook
This commit is contained in:
parent
8160b9da0b
commit
8f461f6ced
4 changed files with 18 additions and 0 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.direnv
|
||||||
|
.pre-commit-config.yaml
|
|
@ -52,5 +52,6 @@
|
||||||
./scripts
|
./scripts
|
||||||
./globals.nix
|
./globals.nix
|
||||||
./formatter.nix
|
./formatter.nix
|
||||||
|
./shell.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
14
shell.nix
Normal file
14
shell.nix
Normal 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;
|
||||||
|
};
|
||||||
|
})
|
Loading…
Reference in a new issue