fix: pre-commit-hook config

This commit is contained in:
Malte Tammena 2023-11-12 22:31:12 +01:00
parent 1f678dfccc
commit df0cf8b9dd
2 changed files with 7 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
/result /result
.direnv .direnv
.pre-commit-config.yaml

View file

@ -106,6 +106,7 @@
perSystem = { perSystem = {
pkgs, pkgs,
self', self',
config,
... ...
}: { }: {
# Configure treefmt # Configure treefmt
@ -130,8 +131,12 @@
in in
builtins.listToAttrs (builtins.map toPackage pkgFiles); builtins.listToAttrs (builtins.map toPackage pkgFiles);
# Create a useable devshell for me # Create a useable devshell for me
devshells.default = { devShells.default = pkgs.mkShell {
name = "dev"; name = "dev";
shellHook = ''
${config.pre-commit.installationScript}
echo 1>&2 "Welcome to the development shell!"
'';
packages = [ packages = [
pkgs.nil pkgs.nil
pkgs.pre-commit pkgs.pre-commit