Skip to content

Commit

Permalink
Add nix fmt hook
Browse files Browse the repository at this point in the history
  • Loading branch information
shikanime committed Sep 20, 2024
1 parent 4e743a6 commit eec6d7b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ in
++ [ (mkRenamedOptionModule [ "settings" "rome" ] [ "hooks" "biome" "settings" ]) ]
# Rename the remaining `settings.<name>` to `hooks.<name>.settings`
++ map (name: mkRenamedOptionModule [ "settings" name ] [ "hooks" name "settings" ])
[ "ansible-lint" "autoflake" "biome" "clippy" "cmake-format" "credo" "deadnix" "denofmt" "denolint" "dune-fmt" "eslint" "flake8" "headache" "hlint" "hpack" "isort" "latexindent" "lychee" "mkdocs-linkcheck" "mypy" "nixfmt" "ormolu" "php-cs-fixer" "phpcbf" "phpcs" "phpstan" "prettier" "psalm" "pylint" "pyright" "pyupgrade" "revive" "statix" ];
[ "ansible-lint" "autoflake" "biome" "clippy" "cmake-format" "credo" "deadnix" "denofmt" "denolint" "dune-fmt" "eslint" "flake8" "headache" "hlint" "hpack" "isort" "latexindent" "lychee" "mkdocs-linkcheck" "mypy" "nix" "nixfmt" "ormolu" "php-cs-fixer" "phpcbf" "phpcs" "phpstan" "prettier" "psalm" "pylint" "pyright" "pyupgrade" "revive" "statix" ];

options.hookModule = lib.mkOption {
type = types.deferredModule;
Expand Down Expand Up @@ -845,6 +845,13 @@ in
};
};
};
nix = mkOption {
description = "nix fmt hook";
type = types.submodule {
imports = [ hookModule ];
options.settings = {};
};
};
nixfmt = mkOption {
description = "Deprecated nixfmt hook";
visible = false;
Expand Down
1 change: 1 addition & 0 deletions nix/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ in
mdl
mdsh
nil
nix
nixpkgs-fmt
ormolu
pre-commit-hook-ensure-sops
Expand Down

0 comments on commit eec6d7b

Please sign in to comment.