mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 08:53:28 +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 = [
|
imports = [
|
||||||
inputs.git-hooks.flakeModule
|
|
||||||
inputs.treefmt-nix.flakeModule
|
inputs.treefmt-nix.flakeModule
|
||||||
./devshell.nix
|
./devshell.nix
|
||||||
];
|
] ++ lib.optional (inputs.git-hooks ? flakeModule) inputs.git-hooks.flakeModule;
|
||||||
|
|
||||||
perSystem =
|
perSystem =
|
||||||
{ pkgs, config, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
fmt = pkgs.nixfmt-rfc-style;
|
fmt = pkgs.nixfmt-rfc-style;
|
||||||
in
|
in
|
||||||
|
@ -23,7 +27,8 @@
|
||||||
statix.enable = true;
|
statix.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
// lib.optionalAttrs (inputs.git-hooks ? flakeModule) {
|
||||||
pre-commit = {
|
pre-commit = {
|
||||||
settings.hooks = {
|
settings.hooks = {
|
||||||
nixfmt = {
|
nixfmt = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue