diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..ad55b2b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,24 @@ +repos: +- repo: local + hooks: + - id: editorconfig-checker + name: Verify Editorconfig + language: system + entry: editorconfig-checker + types: [text] + - id: nixpkgs-fmt + name: Verify Nix Formatting + language: system + entry: nixpkgs-fmt --check + types: [nix] + - id: codespell + name: Check Spelling + language: system + entry: codespell + types: [text] + - id: nix-flake-check + name: Run Nix Flake Checks + language: system + entry: nix flake check --no-build --show-trace + types: [nix] + pass_filenames: false diff --git a/flake.nix b/flake.nix index 8a47f8c..2950dc4 100644 --- a/flake.nix +++ b/flake.nix @@ -67,7 +67,11 @@ nativeBuildInputs = [ # Basic packages pkgs.nixUnstable + # Testing packages + pkgs.codespell + pkgs.editorconfig-checker pkgs.nixpkgs-fmt + pkgs.pre-commit # deploy-rs related pkgs.deploy-rs # sops-nix related