aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--flake.lock76
-rw-r--r--flake.nix5
3 files changed, 81 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..e90b739 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+.pre-commit-config.yaml
diff --git a/flake.lock b/flake.lock
index 1431092..a6d4022 100644
--- a/flake.lock
+++ b/flake.lock
@@ -18,6 +18,22 @@
"type": "github"
}
},
+ "flake-compat": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1767039857,
+ "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
+ "owner": "NixOS",
+ "repo": "flake-compat",
+ "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@@ -55,6 +71,27 @@
"type": "github"
}
},
+ "gitignore": {
+ "inputs": {
+ "nixpkgs": [
+ "pre-commit-hooks",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1709087332,
+ "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "type": "github"
+ }
+ },
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -108,6 +145,22 @@
"type": "github"
}
},
+ "nixpkgs_3": {
+ "locked": {
+ "lastModified": 1770073757,
+ "narHash": "sha256-Vy+G+F+3E/Tl+GMNgiHl9Pah2DgShmIUBJXmbiQPHbI=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "47472570b1e607482890801aeaf29bfb749884f6",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
"nixvim": {
"inputs": {
"flake-parts": "flake-parts",
@@ -128,12 +181,33 @@
"type": "github"
}
},
+ "pre-commit-hooks": {
+ "inputs": {
+ "flake-compat": "flake-compat",
+ "gitignore": "gitignore",
+ "nixpkgs": "nixpkgs_3"
+ },
+ "locked": {
+ "lastModified": 1772893680,
+ "narHash": "sha256-JDqZMgxUTCq85ObSaFw0HhE+lvdOre1lx9iI6vYyOEs=",
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "rev": "8baab586afc9c9b57645a734c820e4ac0a604af9",
+ "type": "github"
+ },
+ "original": {
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "type": "github"
+ }
+ },
"root": {
"inputs": {
"base16": "base16",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
- "nixvim": "nixvim"
+ "nixvim": "nixvim",
+ "pre-commit-hooks": "pre-commit-hooks"
}
},
"systems": {
diff --git a/flake.nix b/flake.nix
index 37b0779..2ea5d88 100644
--- a/flake.nix
+++ b/flake.nix
@@ -14,6 +14,7 @@
outputs =
{
+ self,
nixpkgs,
home-manager,
base16,
@@ -33,6 +34,10 @@
};
};
formatter.${system} = pkgs.nixfmt-tree;
+ devShells.${system}.default = pkgs.mkShell {
+ inherit (self.checks.${system}.pre-commit-check) shellHook;
+ buildInputs = self.checks.${system}.pre-commit-check.enabledPackages;
+ };
homeConfigurations = {
arpit =