diff options
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..779ea74 --- /dev/null +++ b/default.nix @@ -0,0 +1,21 @@ +let + sources = import ./npins; + + pkgs = import sources.nixpkgs { }; + pre-commit-hooks = import sources.pre-commit-hooks; +in +{ + pre-commit-check = pre-commit-hooks.run { + src = ./.; + hooks = { + go-mod-tidy = { + enable = true; + name = "go-mod-tidy"; + description = "Run `go mod tidy`"; + types_or = [ "go" "go-mod" ]; + entry = "${pkgs.go}/bin/go mod tidy"; + pass_filenames = false; + }; + }; + }; +} |