diff --git a/flake.lock b/flake.lock index bd9348d..09ed8a1 100644 --- a/flake.lock +++ b/flake.lock @@ -76,10 +76,33 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1721042469, + "narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "f451c19376071a90d8c58ab1a953c6e9840527fd", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ - "pre-commit", + "git-hooks", "nixpkgs" ] }, @@ -332,16 +355,16 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1718811006, - "narHash": "sha256-0Y8IrGhRmBmT7HHXlxxepg2t8j1X90++qRN3lukGaIk=", + "lastModified": 1720386169, + "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "03d771e513ce90147b65fe922d87d3a0356fc125", + "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } @@ -410,39 +433,16 @@ "type": "github" } }, - "pre-commit": { - "inputs": { - "flake-compat": "flake-compat", - "gitignore": "gitignore", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1719259945, - "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, "root": { "inputs": { "disko": "disko", + "git-hooks": "git-hooks", "hardware": "hardware", "helix": "helix", "home-manager": "home-manager", "hyprland": "hyprland", "nixpkgs": "nixpkgs_3", "nixpkgs-unstable": "nixpkgs-unstable", - "pre-commit": "pre-commit", "slippi": "slippi", "sops-nix": "sops-nix" } diff --git a/flake.nix b/flake.nix index 916d1b5..820ac34 100644 --- a/flake.nix +++ b/flake.nix @@ -10,8 +10,8 @@ sops-nix.inputs.nixpkgs.follows = "nixpkgs-unstable"; sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs"; - pre-commit.url = "github:cachix/pre-commit-hooks.nix"; - pre-commit.inputs.nixpkgs.follows = "nixpkgs"; + git-hooks.url = "github:cachix/git-hooks.nix"; + git-hooks.inputs.nixpkgs.follows = "nixpkgs"; home-manager.url = "github:nix-community/home-manager/release-24.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; @@ -51,7 +51,7 @@ nixpkgs-unstable, disko, sops-nix, - pre-commit, + git-hooks, home-manager, helix, hardware, @@ -93,29 +93,30 @@ templates = import ./templates; formatter = genPkgs (p: p.alejandra); - checks = pkg ({system}: { - pre-commit-check = pre-commit.lib.${system}.run { + checks = genPkgs ({system, ...}: { + git-hooks = git-hooks.lib.${system}.run { src = ./.; hooks = { alejandra.enable = true; }; }; - }) {}; + }); - devShells = pkg ({ + devShells = genPkgs ({ system, pkgs, mkShell, + ... }: { default = mkShell { - inherit (outputs.checks.${system}.pre-commit-check) shellHook; + inherit (outputs.checks.${system}.git-hooks) shellHook; buildInputs = with pkgs; [ lua-language-server nodePackages.bash-language-server ]; }; - }) {}; + }); overlays = { # the default overlay composes all the other overlays together