Skip to content

Commit

Permalink
✨ pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
elythh committed Feb 25, 2024
1 parent fcd54d9 commit dccffff
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
nixpkgs-f2k.url = "github:moni-dz/nixpkgs-f2k";
nixpkgs-howdy.url = "github:fufexan/nixpkgs/howdy";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";


nix-colors.url = "github:misterio77/nix-colors";

Expand Down Expand Up @@ -49,7 +51,16 @@
inherit (self) outputs;
system = "x86_64-linux";
pkgsStable = import nixpkgs-stable { inherit system; };
in {
in
{
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
statix.enable = true;
nixfmt.enable = true;
};
};

formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt;
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
Expand Down

0 comments on commit dccffff

Please sign in to comment.