Skip to content

Commit be0657a

Browse files
authored
Merge pull request #613 from sean-xyz/alejandra-experimental-config-options
feat(alejandra): add option configPath
2 parents 927d798 + 6bd8ba2 commit be0657a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

modules/hooks.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ in
102102
default = false;
103103
example = true;
104104
};
105+
configPath =
106+
mkOption {
107+
type = types.nullOr (types.oneOf [ types.str types.path ]);
108+
description = "(experimental) Path to the alejandra.toml configuration file.";
109+
default = null;
110+
};
105111
exclude =
106112
mkOption {
107113
type = types.listOf types.str;
@@ -2160,6 +2166,7 @@ in
21602166
cmdArgs =
21612167
mkCmdArgs (with hooks.alejandra.settings; [
21622168
[ check "--check" ]
2169+
[ (configPath != null) "--experimental-config ${configPath}" ]
21632170
[ (exclude != [ ]) "--exclude ${lib.strings.concatStringsSep " --exclude " (map lib.escapeShellArg (lib.unique exclude))}" ]
21642171
[ (verbosity == "quiet") "-q" ]
21652172
[ (verbosity == "silent") "-qq" ]

0 commit comments

Comments
 (0)