We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e0a870 commit efb128cCopy full SHA for efb128c
flake-module.nix
@@ -27,11 +27,20 @@ in
27
```
28
'';
29
type = types.submoduleWith {
30
- modules = (import ./.).all-modules pkgs;
+ modules = (import ./.).all-modules pkgs ++ [{
31
+ options.flakeFormatter = lib.mkOption {
32
+ type = types.bool;
33
+ default = true;
34
+ description = lib.mdDoc ''
35
+ Enables `treefmt` the default formatter used by the `nix fmt` command
36
+ '';
37
+ };
38
+ }];
39
};
40
41
config = {
42
checks.treefmt = config.treefmt.build.check self;
43
+ formatter = lib.mkIf config.treefmt.flakeFormatter (lib.mkDefault config.treefmt.build.wrapper);
44
45
});
46
0 commit comments