aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 892f076..3b1802f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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;
+ };
});
}