diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 120000 index 0000000..33d4794 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1 @@ +/nix/store/qh06700fhmh52lwrzswkvbk3g06br5rm-pre-commit-config.json \ No newline at end of file diff --git a/modules/flake-parts/git-hooks.nix b/modules/flake-parts/git-hooks.nix index 8ff3255..8341bf7 100644 --- a/modules/flake-parts/git-hooks.nix +++ b/modules/flake-parts/git-hooks.nix @@ -2,4 +2,11 @@ { # TODO: add to readme imports = [ inputs.git-hooks.flakeModule ]; + perSystem = psArgs: { + pre-commit.settings.hooks = { + nixpkgs-fmt.enable = true; + #TODO: add write-files + }; + make-shells.default.shellHook = psArgs.config.pre-commit.installationScript; + }; }