Skip to content

Commit 05ccbca

Browse files
committed
hooks.nix: fixed type for hooks.shfmt.settings.indent
Signed-off-by: Peter A. <ink.splatters@pm.me>
1 parent b51304e commit 05ccbca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/hooks.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,9 +1764,9 @@ in
17641764
default = true;
17651765
};
17661766
indent = mkOption {
1767-
type = types.int;
1767+
type = types.nullOr (types.oneOf [ types.int types.str ]);
17681768
description = lib.mdDoc "0 for tabs, >0 for number of spaces.";
1769-
default = 0;
1769+
default = null;
17701770
};
17711771
binary-next-line = mkOption {
17721772
type = types.bool;
@@ -4023,7 +4023,7 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.fourm
40234023
(with hooks.shfmt.settings; [
40244024
[ true "-ln ${language-dialect}" ]
40254025
[ simplify "-s" ]
4026-
[ true "-i ${indent}" ]
4026+
[ indent != null "-i ${indent}" ]
40274027
[ binary-next-line "-bn" ]
40284028
[ case-indent "-ci" ]
40294029
[ space-redirects "-sr" ]

0 commit comments

Comments
 (0)