diff --git a/flake.nix b/flake.nix index f3580ab..f670de4 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,21 @@ pkgs, ... }: { + pre-commit = { + check.enable = true; + settings.excludes = ["flake.lock"]; + settings.hooks = { + alejandra.enable = true; + deadnix.enable = true; + prettier.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; - }; - }; -}