Skip to content

Commit

Permalink
stylix: add deadnix and statix pre-commit hooks
Browse files Browse the repository at this point in the history
Add the deadnix and statix pre-commit hooks used in the Lint GitHub
workflow.

Link: danth#519
  • Loading branch information
trueNAHO committed Sep 9, 2024
1 parent fb34813 commit c83cefd
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
50 changes: 50 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@
url = "github:numtide/flake-utils";
};

git-hooks = {
inputs = {
flake-compat.follows = "flake-compat";
nixpkgs-stable.follows = "git-hooks/nixpkgs";
nixpkgs.follows = "nixpkgs";
};

url = "github:cachix/git-hooks.nix";
};

gnome-shell = {
flake = false;

Expand Down Expand Up @@ -70,6 +80,15 @@
inherit (nixpkgs) lib;
pkgs = nixpkgs.legacyPackages.${system};
in {
checks.git-hooks = inputs.git-hooks.lib.${system}.run {
hooks = {
deadnix.enable = true;
statix.enable = true;
};

src = ./.;
};

devShells.default = pkgs.mkShell {
packages = [ inputs.home-manager.packages.${system}.default ];
};
Expand Down

0 comments on commit c83cefd

Please sign in to comment.