From cf4bf773f9e491cbdfb2ad9b384ffc4d9278fb95 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sun, 23 Feb 2025 18:30:57 +0100 Subject: [PATCH] Change url, update variable names. --- flake.lock | 50 +++++++++++++++++++++++++------------------------- flake.nix | 8 ++++---- shell.nix | 6 +++--- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/flake.lock b/flake.lock index aa0fb59..313cdd6 100644 --- a/flake.lock +++ b/flake.lock @@ -231,6 +231,28 @@ } }, "git-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737465171, + "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "git-hooks_2": { "inputs": { "flake-compat": [ "stylix", @@ -259,7 +281,7 @@ "gitignore": { "inputs": { "nixpkgs": [ - "pre-commit-hooks", + "git-hooks", "nixpkgs" ] }, @@ -533,37 +555,15 @@ "type": "github" } }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat", - "gitignore": "gitignore", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1737465171, - "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, "root": { "inputs": { "auto-cpufreq": "auto-cpufreq", + "git-hooks": "git-hooks", "home-manager": "home-manager", "nbfc-linux": "nbfc-linux", "nix-index-database": "nix-index-database", "nixpkgs": "nixpkgs", "nvf": "nvf", - "pre-commit-hooks": "pre-commit-hooks", "stylix": "stylix" } }, @@ -598,7 +598,7 @@ "firefox-gnome-theme": "firefox-gnome-theme", "flake-compat": "flake-compat_2", "flake-utils": "flake-utils_2", - "git-hooks": "git-hooks", + "git-hooks": "git-hooks_2", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", "nixpkgs": [ diff --git a/flake.nix b/flake.nix index 2842a88..ea7db6f 100644 --- a/flake.nix +++ b/flake.nix @@ -42,8 +42,8 @@ }; # Add pre commit hooks - pre-commit-hooks = { - url = "github:cachix/pre-commit-hooks.nix"; + git-hooks = { + url = "github:cachix/git-hooks.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; @@ -53,7 +53,7 @@ nixpkgs, home-manager, auto-cpufreq, - pre-commit-hooks, + git-hooks, ... } @ inputs: { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { @@ -85,6 +85,6 @@ devShells.x86_64-linux.default = let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; - in (import ./shell.nix {inherit pkgs pre-commit-hooks;}); + in (import ./shell.nix {inherit pkgs git-hooks;}); }; } diff --git a/shell.nix b/shell.nix index 7543241..f0ff255 100644 --- a/shell.nix +++ b/shell.nix @@ -1,11 +1,11 @@ { pkgs ? import {}, - pre-commit-hooks, + git-hooks, ... }: let - pre-commit-check = pre-commit-hooks.lib.${pkgs.system}.run { + git-check = git-hooks.lib.${pkgs.system}.run { src = "."; hooks = {alejandra.enable = true;}; }; in - pkgs.mkShell {inherit (pre-commit-check) shellHook;} + pkgs.mkShell {inherit (git-check) shellHook;}