diff options
| author | Fuwn <[email protected]> | 2024-09-13 06:22:58 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-13 06:22:58 -0700 |
| commit | c2be2bd8b096c3cf506bf889d586ff4aaf5d0a8f (patch) | |
| tree | 6a1543121d5181d265d332fcd3daa16cc5a9824d | |
| parent | b2689036f2e9182a219061f5abd156314d852e82 (diff) | |
| download | pywal.nix-c2be2bd8b096c3cf506bf889d586ff4aaf5d0a8f.tar.xz pywal.nix-c2be2bd8b096c3cf506bf889d586ff4aaf5d0a8f.zip | |
chore(flake): add git hooks and checks
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | flake.nix | 19 |
2 files changed, 20 insertions, 0 deletions
@@ -1 +1,2 @@ __pycache__ +.pre-commit-config.yaml @@ -17,8 +17,10 @@ outputs = { + self, nixpkgs, flake-utils, + pre-commit-hooks, ... }: flake-utils.lib.eachDefaultSystem (system: { @@ -152,5 +154,22 @@ }; formatter = nixpkgs.legacyPackages."${system}".nixfmt-rfc-style; + + checks.pre-commit-check = pre-commit-hooks.lib.${system}.run { + src = ./.; + + hooks = { + deadnix.enable = true; + flake-checker.enable = true; + nixfmt-rfc-style.enable = true; + statix.enable = true; + }; + }; + + devShells.default = nixpkgs.legacyPackages.${system}.mkShell { + inherit (self.checks.${system}.pre-commit-check) shellHook; + + buildInputs = self.checks.${system}.pre-commit-check.enabledPackages; + }; }); } |