diff --git a/modules/hook.nix b/modules/hook.nix index 67686c88..ab58c52b 100644 --- a/modules/hook.nix +++ b/modules/hook.nix @@ -118,6 +118,15 @@ in default = [ ]; }; + exclude_types = mkOption { + type = types.listOf types.str; + description = + '' + List of file types to exclude. See [Filtering files with types](https://pre-commit.com/#filtering-files-with-types). + ''; + default = [ ]; + }; + pass_filenames = mkOption { type = types.bool; description = '' @@ -166,12 +175,21 @@ in if true this hook will run even if there are no matching files. ''; }; + + args = mkOption { + type = types.listOf types.str; + description = + '' + List of additional parameters to pass to the hook. + ''; + default = [ ]; + }; }; config = { raw = { - inherit (config) name entry language files types types_or pass_filenames fail_fast require_serial stages verbose always_run; + inherit (config) name entry language files types types_or exclude_types pass_filenames fail_fast require_serial stages verbose always_run args; id = config.name; exclude = mergeExcludes config.excludes; };