From 026a3d56d23ca30e0850fd308764c1b8e2639976 Mon Sep 17 00:00:00 2001 From: jh-devv Date: Fri, 15 Mar 2024 17:06:34 +0200 Subject: [PATCH] chore(nix): remove 'pre-commit-hooks.nix' in favor of the code being in 'flake.nix' --- flake.nix | 17 ++++++++++++----- pre-commit-hooks.nix | 15 --------------- 2 files changed, 12 insertions(+), 20 deletions(-) delete mode 100644 pre-commit-hooks.nix diff --git a/flake.nix b/flake.nix index f3580ab..92f4a23 100644 --- a/flake.nix +++ b/flake.nix @@ -16,7 +16,7 @@ systems = ["x86_64-linux"]; imports = [ - ./pre-commit-hooks.nix + inputs.pre-commit-hooks.flakeModule ]; perSystem = { @@ -24,15 +24,22 @@ pkgs, ... }: { + pre-commit = { + settings.excludes = ["flake.lock"]; + + settings = { + hooks = { + alejandra.enable = true; + yamllint.enable = true; + markdownlint.enable = true; + }; + }; + }; devShells.default = pkgs.mkShell { packages = [ - pkgs.alejandra pkgs.git pkgs.packwiz - pkgs.yamllint ]; - name = "mc-modpack-kit"; - DIRENV_LOG_FORMAT = ""; shellHook = '' ${config.pre-commit.installationScript} ''; diff --git a/pre-commit-hooks.nix b/pre-commit-hooks.nix deleted file mode 100644 index 35ffd3f..0000000 --- a/pre-commit-hooks.nix +++ /dev/null @@ -1,15 +0,0 @@ -{inputs, ...}: { - imports = [inputs.pre-commit-hooks.flakeModule]; - - perSystem.pre-commit = { - settings.excludes = ["flake.lock"]; - - settings = { - hooks = { - alejandra.enable = true; - yamllint.enable = true; - }; - settings.yamllint.relaxed = true; - }; - }; -}