Skip to content

Commit

Permalink
Move hook-specific settings under hooks.<name>.settings
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo committed Feb 10, 2024
1 parent 5e1de32 commit 91bb56e
Showing 1 changed file with 44 additions and 44 deletions.
88 changes: 44 additions & 44 deletions modules/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let
in
{
imports =
map (o: mkRenamedOptionModule [ "settings" o ] [ "hooks" o ])
map (o: mkRenamedOptionModule [ "settings" o ] [ "hooks" o "settings" ])
[ "alejandra" "ansible-lint" "autoflake" "clippy" "cmake-format" "credo" "deadnix" "denofmt" "denolint" "dune-fmt" "eclint" "eslint" "flake8" "flynt" "headache" "hlint" "hpack" "isort" "latexindent" "lua-ls" "lychee" "markdownlint" "mdl" "mkdocs-linkcheck" "mypy" "nixfmt" "ormolu" "php-cs-fixer" "phpcbf" "phpcs" "phpstan" "prettier" "psalm" "pylint" "pyright" "pyupgrade" "revive" "rome" "statix" "treefmt" "typos" "vale" "yamllint" ];

# PLEASE keep this sorted alphabetically.
Expand All @@ -46,7 +46,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
check =
mkOption {
type = types.bool;
Expand Down Expand Up @@ -82,7 +82,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
configPath = mkOption {
type = types.str;
description = lib.mdDoc "Path to the YAML configuration file.";
Expand All @@ -102,7 +102,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
type = types.str;
Expand All @@ -126,7 +126,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
denyWarnings = mkOption {
type = types.bool;
description = lib.mdDoc "Fail when warnings are present";
Expand All @@ -149,7 +149,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
configPath = mkOption {
type = types.str;
description = lib.mdDoc "Path to the configuration file (.json,.python,.yaml)";
Expand All @@ -163,7 +163,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
strict =
mkOption {
type = types.bool;
Expand All @@ -177,7 +177,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
edit =
mkOption {
type = types.bool;
Expand Down Expand Up @@ -233,7 +233,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
write =
mkOption {
type = types.bool;
Expand All @@ -255,7 +255,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
format =
mkOption {
type = types.enum [ "default" "compact" "json" ];
Expand All @@ -278,7 +278,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
auto-promote =
mkOption {
type = types.bool;
Expand All @@ -299,7 +299,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
fix =
mkOption {
type = types.bool;
Expand Down Expand Up @@ -337,7 +337,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
type = types.path;
Expand All @@ -361,7 +361,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
type = types.str;
Expand Down Expand Up @@ -391,7 +391,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
aggressive =
mkOption {
type = types.bool;
Expand Down Expand Up @@ -467,7 +467,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
header-file = mkOption {
type = types.str;
description = lib.mdDoc "Path to the header file.";
Expand All @@ -480,7 +480,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
hintFile =
mkOption {
type = types.nullOr types.path;
Expand All @@ -494,7 +494,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
silent =
mkOption {
type = types.bool;
Expand All @@ -508,7 +508,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
profile =
mkOption {
type = types.enum [ "" "black" "django" "pycharm" "google" "open_stack" "plone" "attrs" "hug" "wemake" "appnexus" ];
Expand All @@ -528,7 +528,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
flags =
mkOption {
type = types.str;
Expand All @@ -542,7 +542,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
checklevel = mkOption {
type = types.enum [ "Error" "Warning" "Information" "Hint" ];
description = lib.mdDoc
Expand All @@ -562,7 +562,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
configPath =
mkOption {
type = types.str;
Expand All @@ -582,7 +582,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
config =
mkOption {
type = types.attrs;
Expand All @@ -597,7 +597,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
configPath =
mkOption {
type = types.str;
Expand Down Expand Up @@ -678,7 +678,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
type = types.path;
Expand Down Expand Up @@ -730,7 +730,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
type = types.str;
Expand All @@ -747,7 +747,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
width =
mkOption {
type = types.nullOr types.int;
Expand All @@ -761,7 +761,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
defaultExtensions =
mkOption {
type = types.listOf types.str;
Expand All @@ -781,7 +781,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
type = types.str;
Expand All @@ -798,7 +798,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
type = types.str;
Expand All @@ -815,7 +815,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
type = types.str;
Expand All @@ -832,7 +832,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
type = types.str;
Expand All @@ -851,7 +851,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
description = lib.mdDoc
Expand Down Expand Up @@ -1094,7 +1094,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
type = types.str;
Expand All @@ -1111,7 +1111,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
type = types.str;
Expand Down Expand Up @@ -1140,7 +1140,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
type = types.str;
Expand All @@ -1157,7 +1157,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
type = types.str;
Expand All @@ -1174,7 +1174,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
configPath =
mkOption {
type = types.str;
Expand All @@ -1190,7 +1190,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
binPath =
mkOption {
type = types.path;
Expand Down Expand Up @@ -1220,7 +1220,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
format =
mkOption {
type = types.enum [ "stderr" "errfmt" "json" ];
Expand All @@ -1242,7 +1242,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
# package = mkOption {
# type = types.package;
# description = lib.mdDoc
Expand Down Expand Up @@ -1275,7 +1275,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
color =
mkOption {
type = types.enum [ "auto" "always" "never" ];
Expand Down Expand Up @@ -1357,7 +1357,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
config =
mkOption {
type = types.str;
Expand Down Expand Up @@ -1388,7 +1388,7 @@ in
description = "";
type = types.submodule {
imports = hookModule;
options = {
options.settings = {
relaxed = mkOption {
type = types.bool;
description = lib.mdDoc "Whether to use the relaxed configuration.";
Expand Down

0 comments on commit 91bb56e

Please sign in to comment.