mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
flake/dev: make git-hooks
optional
as this isn't used by consumers, they should be able to remove this input via `inputs.nixvim.inputs.git-hooks.follows = ""`. it is especially important here as `git-hooks` has a large amount of inputs itself
This commit is contained in:
parent
2f21379b8c
commit
432a513ccd
1 changed files with 10 additions and 5 deletions
|
@ -1,13 +1,17 @@
|
|||
{ inputs, ... }:
|
||||
{ lib, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.git-hooks.flakeModule
|
||||
inputs.treefmt-nix.flakeModule
|
||||
./devshell.nix
|
||||
];
|
||||
] ++ lib.optional (inputs.git-hooks ? flakeModule) inputs.git-hooks.flakeModule;
|
||||
|
||||
perSystem =
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
fmt = pkgs.nixfmt-rfc-style;
|
||||
in
|
||||
|
@ -23,7 +27,8 @@
|
|||
statix.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
// lib.optionalAttrs (inputs.git-hooks ? flakeModule) {
|
||||
pre-commit = {
|
||||
settings.hooks = {
|
||||
nixfmt = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue