Skip to content

Commit eec6d7b

Browse files
committed
Add nix fmt hook
1 parent 4e743a6 commit eec6d7b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

modules/hooks.nix

+8-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ in
4949
++ [ (mkRenamedOptionModule [ "settings" "rome" ] [ "hooks" "biome" "settings" ]) ]
5050
# Rename the remaining `settings.<name>` to `hooks.<name>.settings`
5151
++ map (name: mkRenamedOptionModule [ "settings" name ] [ "hooks" name "settings" ])
52-
[ "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" ];
52+
[ "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" ];
5353

5454
options.hookModule = lib.mkOption {
5555
type = types.deferredModule;
@@ -845,6 +845,13 @@ in
845845
};
846846
};
847847
};
848+
nix = mkOption {
849+
description = "nix fmt hook";
850+
type = types.submodule {
851+
imports = [ hookModule ];
852+
options.settings = {};
853+
};
854+
};
848855
nixfmt = mkOption {
849856
description = "Deprecated nixfmt hook";
850857
visible = false;

nix/tools.nix

+1
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ in
134134
mdl
135135
mdsh
136136
nil
137+
nix
137138
nixpkgs-fmt
138139
ormolu
139140
pre-commit-hook-ensure-sops

0 commit comments

Comments
 (0)