diff --git a/flake.lock b/flake.lock index 061993c8..33f2225b 100644 --- a/flake.lock +++ b/flake.lock @@ -272,10 +272,41 @@ "type": "github" } }, + "gitHooks": { + "inputs": { + "flake-compat": [ + "flakeCompat" + ], + "flake-utils": [ + "flakeUtils" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": [ + "gitHooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1714478972, + "narHash": "sha256-q//cgb52vv81uOuwz1LaXElp3XAe1TqrABXODAEF6Sk=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "2849da033884f54822af194400f8dff435ada242", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ - "preCommitHooks", + "gitHooks", "nixpkgs" ] }, @@ -339,7 +370,7 @@ "nixpkgs" ], "preCommitHooks": [ - "preCommitHooks" + "gitHooks" ] }, "locked": { @@ -520,7 +551,7 @@ "nixpkgs" ], "pre-commit-hooks": [ - "preCommitHooks" + "gitHooks" ] }, "locked": { @@ -537,43 +568,13 @@ "type": "github" } }, - "preCommitHooks": { - "inputs": { - "flake-compat": [ - "flakeCompat" - ], - "flake-utils": [ - "flakeUtils" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": [ - "preCommitHooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1714478972, - "narHash": "sha256-q//cgb52vv81uOuwz1LaXElp3XAe1TqrABXODAEF6Sk=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "2849da033884f54822af194400f8dff435ada242", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, "root": { "inputs": { "agenix": "agenix", "dragonXplr": "dragonXplr", "flakeCompat": "flakeCompat", "flakeUtils": "flakeUtils", + "gitHooks": "gitHooks", "homeManager": "homeManager", "logo": "logo", "nix-alien": "nix-alien", @@ -582,7 +583,6 @@ "nixpkgsAntoraLunrExtension": "nixpkgsAntoraLunrExtension", "nixpkgsBuildEnv": "nixpkgsBuildEnv", "nixvim": "nixvim", - "preCommitHooks": "preCommitHooks", "stylix": "stylix", "systems": "systems_2", "triPaneXplr": "triPaneXplr" diff --git a/flake.nix b/flake.nix index 574e780d..66e1b11b 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,17 @@ url = "github:numtide/flake-utils"; }; + gitHooks = { + inputs = { + flake-compat.follows = "flakeCompat"; + flake-utils.follows = "flakeUtils"; + nixpkgs-stable.follows = "gitHooks/nixpkgs"; + nixpkgs.follows = "nixpkgs"; + }; + + url = "github:cachix/git-hooks.nix"; + }; + homeManager = { inputs.nixpkgs.follows = "nixpkgs"; url = "github:nix-community/home-manager"; @@ -38,7 +49,7 @@ inputs = { flakeUtils.follows = "flakeUtils"; nixpkgs.follows = "nixpkgs"; - preCommitHooks.follows = "preCommitHooks"; + preCommitHooks.follows = "gitHooks"; }; url = "github:trueNAHO/logo-nixos"; @@ -74,7 +85,7 @@ # [1]: https://github.com/NixOS/nixpkgs/pull/332341 nixpkgsAntoraLunrExtension.url = "github:trueNAHO/nixpkgs/antora-lunr-extension-init-at-1-0-0-alpha-8"; - # pkgs.buildEnv fails with the following error due to the preCommitHooks + # pkgs.buildEnv fails with the following error due to the gitHooks # derivation containing an empty file: # # The store path is a file and can't be merged into an @@ -93,23 +104,12 @@ home-manager.follows = "homeManager"; nix-darwin.follows = "nixDarwin"; nixpkgs.follows = "nixpkgs"; - pre-commit-hooks.follows = "preCommitHooks"; + pre-commit-hooks.follows = "gitHooks"; }; url = "github:nix-community/nixvim"; }; - preCommitHooks = { - inputs = { - flake-compat.follows = "flakeCompat"; - flake-utils.follows = "flakeUtils"; - nixpkgs-stable.follows = "preCommitHooks/nixpkgs"; - nixpkgs.follows = "nixpkgs"; - }; - - url = "github:cachix/pre-commit-hooks.nix"; - }; - stylix = { inputs = { flake-compat.follows = "flakeCompat"; @@ -349,7 +349,7 @@ inputs.self.homeConfigurations ) // { - preCommitHooks = inputs.preCommitHooks.lib.${system}.run { + gitHooks = inputs.gitHooks.lib.${system}.run { hooks = { alejandra = { enable = true; @@ -371,12 +371,12 @@ }; devShells.default = pkgs.mkShell { - inherit (inputs.self.checks.${system}.preCommitHooks) shellHook; + inherit (inputs.self.checks.${system}.gitHooks) shellHook; packages = [ inputs.agenix.packages.${system}.default inputs.homeManager.packages.${system}.default - inputs.self.checks.${system}.preCommitHooks.enabledPackages + inputs.self.checks.${system}.gitHooks.enabledPackages inputs.self.packages.${system}.docs.nativeBuildInputs pkgs.asciidoctor-with-extensions pkgs.http-server